{
  "resourceType": "StructureDefinition",
  "id": "CA-eReC-DocumentReference",
  "url": "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-DocumentReference",
  "name": "DocumentReference",
  "status": "draft",
  "description": "A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this \"document\" encompasses any serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare. The DocumentReference resource provides metadata about the document so that the document can be discovered and managed. The actual content may be inline base64 encoded data or provided by direct reference.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.identifier",
        "path": "DocumentReference.identifier",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.identifier.system",
        "path": "DocumentReference.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.identifier.value",
        "path": "DocumentReference.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.status",
        "path": "DocumentReference.status",
        "patternCode": "current",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject.reference",
        "path": "DocumentReference.subject.reference",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject.identifier",
        "path": "DocumentReference.subject.identifier",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject.identifier.system",
        "path": "DocumentReference.subject.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject.identifier.value",
        "path": "DocumentReference.subject.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.date",
        "path": "DocumentReference.date",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-Practitioner",
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-PractitionerRole"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author.reference",
        "path": "DocumentReference.author.reference",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author.identifier",
        "path": "DocumentReference.author.identifier",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author.identifier.system",
        "path": "DocumentReference.author.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author.identifier.value",
        "path": "DocumentReference.author.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content",
        "path": "DocumentReference.content",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment",
        "path": "DocumentReference.content.attachment",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context",
        "path": "DocumentReference.context",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related",
        "path": "DocumentReference.context.related",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.infoway-inforoute.ca/io/CA-eReC/StructureDefinition/CA-eReC-ServiceRequest"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related.reference",
        "path": "DocumentReference.context.related.reference",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related.identifier",
        "path": "DocumentReference.context.related.identifier",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related.identifier.system",
        "path": "DocumentReference.context.related.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related.identifier.value",
        "path": "DocumentReference.context.related.identifier.value",
        "min": 1,
        "mustSupport": true
      }
    ]
  }
}