{
  "resourceType": "StructureDefinition",
  "url": "https://example.org/fhir/StructureDefinition/Wayfinder-UKCore-DocumentReference",
  "name": "WayfinderUKCoreDocumentReference",
  "status": "draft",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.id",
        "path": "DocumentReference.id",
        "min": 1
      },
      {
        "id": "DocumentReference.extension:extensionWayfinderDocumentReadReceipt",
        "path": "DocumentReference.extension",
        "sliceName": "extensionWayfinderDocumentReadReceipt",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.uk/StructureDefinition/Extension-Document-ReadReceipt"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "DocumentReference.identifier.system",
        "path": "DocumentReference.identifier.system",
        "min": 1
      },
      {
        "id": "DocumentReference.identifier.value",
        "path": "DocumentReference.identifier.value",
        "min": 1
      },
      {
        "id": "DocumentReference.status",
        "path": "DocumentReference.status",
        "short": "current"
      },
      {
        "id": "DocumentReference.docStatus",
        "path": "DocumentReference.docStatus",
        "short": "final | amended | corrected | appended"
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "min": 1
      },
      {
        "id": "DocumentReference.subject.type",
        "path": "DocumentReference.subject.type",
        "min": 1
      },
      {
        "id": "DocumentReference.subject.identifier",
        "path": "DocumentReference.subject.identifier",
        "min": 1
      },
      {
        "id": "DocumentReference.subject.identifier.system",
        "path": "DocumentReference.subject.identifier.system",
        "min": 1
      },
      {
        "id": "DocumentReference.subject.identifier.value",
        "path": "DocumentReference.subject.identifier.value",
        "min": 1
      },
      {
        "id": "DocumentReference.date",
        "path": "DocumentReference.date",
        "min": 1
      },
      {
        "id": "DocumentReference.custodian",
        "path": "DocumentReference.custodian",
        "min": 1
      },
      {
        "id": "DocumentReference.custodian.type",
        "path": "DocumentReference.custodian.type",
        "short": "Organization",
        "min": 1
      },
      {
        "id": "DocumentReference.custodian.identifier",
        "path": "DocumentReference.custodian.identifier",
        "min": 1
      },
      {
        "id": "DocumentReference.custodian.identifier.system",
        "path": "DocumentReference.custodian.identifier.system",
        "min": 1
      },
      {
        "id": "DocumentReference.custodian.identifier.value",
        "path": "DocumentReference.custodian.identifier.value",
        "min": 1
      },
      {
        "id": "DocumentReference.custodian.display",
        "path": "DocumentReference.custodian.display",
        "min": 1
      },
      {
        "id": "DocumentReference.description",
        "path": "DocumentReference.description",
        "min": 1
      },
      {
        "id": "DocumentReference.content",
        "path": "DocumentReference.content",
        "max": "1"
      },
      {
        "id": "DocumentReference.content.attachment.contentType",
        "path": "DocumentReference.content.attachment.contentType",
        "short": "application | pdf",
        "min": 1
      },
      {
        "id": "DocumentReference.content.attachment.url",
        "path": "DocumentReference.content.attachment.url",
        "min": 1
      },
      {
        "id": "DocumentReference.context.period",
        "path": "DocumentReference.context.period",
        "min": 1
      },
      {
        "id": "DocumentReference.context.period.start",
        "path": "DocumentReference.context.period.start",
        "min": 1
      },
      {
        "id": "DocumentReference.context.related.reference",
        "path": "DocumentReference.context.related.reference",
        "min": 1
      },
      {
        "id": "DocumentReference.context.related.type",
        "path": "DocumentReference.context.related.type",
        "short": "Appointment",
        "min": 1
      }
    ]
  }
}