{
  "resourceType": "StructureDefinition",
  "url": "http://apiframework.dedalus.eu/fhir/StructureDefinition/DocumentReference-ForITI65",
  "name": "DocumentReference-ForITI65",
  "status": "active",
  "experimental": false,
  "description": "FHIR Profile that shall be used when performing IHE ITI65",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "DocumentReference",
  "baseDefinition": "http://apiframework.dedalus.eu/fhir/StructureDefinition/DocumentReference",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DocumentReference.content.attachment.contentType",
        "path": "DocumentReference.content.attachment.contentType",
        "min": 1
      },
      {
        "id": "DocumentReference.content.attachment.size",
        "path": "DocumentReference.content.attachment.size",
        "min": 1
      },
      {
        "id": "DocumentReference.content.attachment.hash",
        "path": "DocumentReference.content.attachment.hash",
        "min": 1
      },
      {
        "id": "DocumentReference.context.related",
        "path": "DocumentReference.context.related",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "ref.reference"
            },
            {
              "type": "value",
              "path": "ref.identifier.system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "DocumentReference.context.related.ref",
        "path": "DocumentReference.context.related.ref",
        "min": 1
      },
      {
        "id": "DocumentReference.context.related:relatedDR",
        "path": "DocumentReference.context.related",
        "sliceName": "relatedDR"
      },
      {
        "id": "DocumentReference.context.related:relatedDR.ref",
        "path": "DocumentReference.context.related.ref",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://apiframework.dedalus.eu/fhir/StructureDefinition/DiagnosticReport",
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.context.related:relatedDR.ref.reference",
        "path": "DocumentReference.context.related.ref.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related:groupingToken",
        "path": "DocumentReference.context.related",
        "sliceName": "groupingToken",
        "max": "1"
      },
      {
        "id": "DocumentReference.context.related:groupingToken.ref.identifier",
        "path": "DocumentReference.context.related.ref.identifier",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related:groupingToken.ref.identifier.system",
        "path": "DocumentReference.context.related.ref.identifier.system",
        "min": 1,
        "fixedUri": "http://apiframework.dedalus.eu/identifiers/groupingToken",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related:groupingToken.ref.identifier.value",
        "path": "DocumentReference.context.related.ref.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.related:groupingToken.ref.identifier.assigner",
        "path": "DocumentReference.context.related.ref.identifier.assigner",
        "mustSupport": true
      }
    ]
  }
}