### ----------------------------------------------------
### -- FHIR
### -- Licenses: Artistic-2.0
### -- Authors: Hugh Simpson
### -- File: t/resources/structureDefinition/DocumentReference.json
### ----------------------------------------------------
### -- Chunk 7 of 9
min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "DocumentReference.relatesTo.extension",
      "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. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "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" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "DocumentReference.relatesTo.modifierExtension",
      "path" : "DocumentReference.relatesTo.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "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.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "DocumentReference.relatesTo.code",
      "path" : "DocumentReference.relatesTo.code",
      "short" : "replaces | transforms | signs | appends",
      "definition" : "The type of relationship that this document has with anther document.",
      "comment" : "If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "DocumentReference.relatesTo.code",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "code"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DocumentRelationshipType"
        }],
        "strength" : "required",
        "description" : "The type of relationship between documents.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.0"
      },
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.relatesTo.code"
      },
      {
        "identity" : "rim",
        "map" : ".outboundRelationship.typeCode"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry Associations type"
      }]
    },
    {
      "id" : "DocumentReference.relatesTo.target",
      "path" : "DocumentReference.relatesTo.target",
      "short" : "Target of the relationship",
      "definition" : "The target document of this relationship.",
      "min" : 1,
      "max" : "1",
      "base" : {
        "path" : "DocumentReference.relatesTo.target",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/DocumentReference"]
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.relatesTo.target"
      },
      {
        "identity" : "rim",
        "map" : ".target[classCode=\"DOC\", moodCode=\"EVN\"].id"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry Associations reference"
      }]
    },
    {
      "id" : "DocumentReference.description",
      "path" : "DocumentReference.description",
      "short" : "Human-readable description",
      "definition" : "Human-readable description of the source document.",
      "comment" : "What the document is about,  a terse summary of the document.",
      "requirements" : "Helps humans to assess whether the document is of interest.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "DocumentReference.description",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "v2",
        "map" : "TXA-25"
      },
      {
        "identity" : "rim",
        "map" : ".outboundRelationship[typeCode=\"SUBJ\"].target.text"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.comments"
      }]
    },
    {
      "id" : "DocumentReference.securityLabel",
      "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.",
      "comment" : "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.   \n\nIn 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" : "*",
      "base" : {
        "path" : "DocumentReference.securityLabel",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "SecurityLabels"
        },
        {
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean" : true
        }],
        "strength" : "extensible",
        "description" : "Security Labels from the Healthcare Privacy and Security Classification System.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/security-labels"
      },
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.confidentiality, Composition.meta.security"
      },
      {
        "identity" : "v2",
        "map" : "TXA-18"
      },
      {
        "identity" : "rim",
        "map" : ".confidentialityCode"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.confidentialityCode"
      },
      {
        "identity" : "cda",
        "map" : "ClinicalDocument/confidentialityCode/@code"
      }]
    },
    {
      "id" : "DocumentReference.content",
      "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" : "*",
      "base" : {
        "path" : "DocumentReference.content",
        "min" : 1,
        "max" : "*"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Bundle(Composition+*)"
      },
      {
        "identity" : "rim",
        "map" : "document.text"
      }]
    },
    {
      "id" : "DocumentReference.content.id",
      "path" : "DocumentReference.content.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "DocumentReference.content.extension",
      "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. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "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" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "DocumentReference.content.modifierExtension",
      "path" : "DocumentReference.content.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "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.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "DocumentReference.content.attachment",
      "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",
      "base" : {
        "path" : "DocumentReference.content.attachment",
        "min" : 1,
        "max" : "1"
      },
      "type" : [{
        "code" : "Attachment"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.language, \nComposition.title, \nComposition.date"
      },
      {
        "identity" : "v2",
        "map" : "TXA-3 for mime type"
      },
      {
        "identity" : "rim",
        "map" : "document.text"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime"
      },
      {
        "identity" : "cda",
        "map" : "ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date"
      }]
    },
    {
      "id" : "DocumentReference.content.format",
      "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.",
      "comment" : "Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "DocumentReference.content.format",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Coding"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DocumentFormat"
        }],
        "strength" : "preferred",
        "description" : "Document Format Codes.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/formatcodes"
      },
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.meta.profile"
      },
      {
        "identity" : "rim",
        "map" : "document.text"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.formatCode"
      },
      {
        "identity" : "cda",
        "map" : "derived from the IHE Profile or Implementation Guide templateID"
      }]
    },
    {
      "id" : "DocumentReference.context",
      "path" : "DocumentReference.context",
      "short" : "Clinical context of document",
      "definition" : "The clinical context in which the document was prepared.",
      "comment" : "These values are primarily added to help with searching for interesting/relevant documents.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "DocumentReference.context",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "BackboneElement"
      }],
      "constraint" : [{
        "key" : "ele-1",
        "severity" : "error",
        "human" : "All FHIR elements must have a @value or children",
        "expression" : "hasValue() or (children().count() > id.count())",
        "xpath" : "@value|f:*|h:div",
        "source" : "Element"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "outboundRelationship[typeCode=\"SUBJ\"].target[classCode<'ACT']"
      }]
    },
    {
      "id" : "DocumentReference.context.id",
      "path" : "DocumentReference.context.id",
      "representation" : ["xmlAttr"],
      "short" : "Unique id for inter-element referencing",
      "definition" : "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "min" : 0,
      "max" : "1",
      "base" : {
        "path" : "Element.id",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "string"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "DocumentReference.context.extension",
      "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. 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 can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "comment" : "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" : "*",
      "base" : {
        "path" : "Element.extension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "rim",
        "map" : "n/a"
      }]
    },
    {
      "id" : "DocumentReference.context.modifierExtension",
      "path" : "DocumentReference.context.modifierExtension",
      "short" : "Extensions that cannot be ignored even if unrecognized",
      "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 in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. 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 can 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.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "comment" : "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.",
      "requirements" : "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](extensibility.html#modifierExtension).",
      "alias" : ["extensions",
      "user content",
      "modifiers"],
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "BackboneElement.modifierExtension",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Extension"
      }],
      "isModifier" : true,
      "isModifierReason" : "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary" : true,
      "mapping" : [{
        "identity" : "rim",
        "map" : "N/A"
      }]
    },
    {
      "id" : "DocumentReference.context.encounter",
      "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" : "*",
      "base" : {
        "path" : "DocumentReference.context.encounter",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Encounter",
        "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "workflow",
        "map" : "Event.context"
      },
      {
        "identity" : "w5",
        "map" : "FiveWs.context"
      },
      {
        "identity" : "fhircomposition",
        "map" : "Composition.encounter"
      },
      {
        "identity" : "rim",
        "map" : "unique(highest(./outboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()], priorityNumber)/target[moodCode=\"EVN\" and classCode=(\"ENC\", \"PCPR\") and isNormalAct])"
      }]
    },
    {
      "id" : "DocumentReference.context.event",
      "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 type Code, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.",
      "comment" : "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" : "*",
      "base" : {
        "path" : "DocumentReference.context.event",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DocumentEventType"
        }],
        "strength" : "example",
        "description" : "This list of codes represents the main clinical acts being documented.",
        "valueSet" : "http://terminology.hl7.org/ValueSet/v3-ActCode"
      },
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.event.code"
      },
      {
        "identity" : "rim",
        "map" : ".code"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.eventCodeList"
      }]
    },
    {
      "id" : "DocumentReference.context.period",
      "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",
      "base" : {
        "path" : "DocumentReference.context.period",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Period"
      }],
      "isModifier" : false,
      "isSummary" : true,
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.event.period"
      },
      {
        "identity" : "rim",
        "map" : ".effectiveTime"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime"
      },
      {
        "identity" : "cda",
        "map" : "ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/low/\n@value --> ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/high/\n@value"
      }]
    },
    {
      "id" : "DocumentReference.context.facilityType",
      "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",
      "base" : {
        "path" : "DocumentReference.context.facilityType",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DocumentC80FacilityType"
        }],
        "strength" : "example",
        "description" : "XDS Facility Type.",
        "valueSet" : "http://hl7.org/fhir/ValueSet/c80-facilitycodes"
      },
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "usually from a mapping to a local ValueSet"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.healthcareFacilityTypeCode"
      },
      {
        "identity" : "cda",
        "map" : "usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code"
      }]
    },
    {
      "id" : "DocumentReference.context.practiceSetting",
      "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.",
      "comment" : "This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC.",
      "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",
      "base" : {
        "path" : "DocumentReference.context.practiceSetting",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "CodeableConcept"
      }],
      "isModifier" : false,
      "isSummary" : false,
      "binding" : {
        "extension" : [{
          "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString" : "DocumentC80PracticeSetting"
        }],
        "strength" : "example",
        "description" : "Additional details about where the content was created (e.g. clinical specialty).",
        "valueSet" : "http://hl7.org/fhir/ValueSet/c80-practice-codes"
      },
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "usually from a mapping to a local ValueSet"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.practiceSettingCode"
      },
      {
        "identity" : "cda",
        "map" : "usually from a mapping to a local ValueSet"
      }]
    },
    {
      "id" : "DocumentReference.context.sourcePatientInfo",
      "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",
      "base" : {
        "path" : "DocumentReference.context.sourcePatientInfo",
        "min" : 0,
        "max" : "1"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Patient"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.subject"
      },
      {
        "identity" : "rim",
        "map" : ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId"
      },
      {
        "identity" : "cda",
        "map" : "ClinicalDocument/recordTarget/"
      }]
    },
    {
      "id" : "DocumentReference.context.related",
      "path" : "DocumentReference.context.related",
      "short" : "Related identifiers or resources",
      "definition" : "Related identifiers or resources associated with the DocumentReference.",
      "comment" : "May be identifiers or resources that caused the DocumentReference or referenced Document to be created.",
      "min" : 0,
      "max" : "*",
      "base" : {
        "path" : "DocumentReference.context.related",
        "min" : 0,
        "max" : "*"
      },
      "type" : [{
        "code" : "Reference",
        "targetProfile" : ["http://hl7.org/fhir/StructureDefinition/Resource"]
      }],
      "isModifier" : false,
      "isSummary" : false,
      "mapping" : [{
        "identity" : "fhircomposition",
        "map" : "Composition.event.detail"
      },
      {
        "identity" : "rim",
        "map" : "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct]"
      },
      {
        "identity" : "xds",
        "map" : "DocumentEntry.referenceIdList"
      },
      {
        "identity" : "cda",
        "map" : "ClinicalDocument/relatedDocument"
      }]
    }]
  },
  "differential" : {
    "element" : [{
      "id" : "DocumentReference",
      "path" : "DocumentReference",
      "short" : "A reference to a document",
      "definition" : "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like