{
  "resourceType": "StructureDefinition",
  "url": "http://fhir.smart4health.eu/StructureDefinition/s4h-documentreference",
  "name": "S4hDocumentReference",
  "status": "draft",
  "date": "2022-01-12T15:58:22.7244019+00:00",
  "publisher": "D4L data4life gGmbh",
  "description": "DocumentReference profile for use within the Smart4Health project.",
  "copyright": "2020 D4L data4life gGmbh",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "fhircomposition",
      "uri": "http://hl7.org/fhir/composition",
      "name": "FHIR Composition"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "cda",
      "uri": "http://hl7.org/v3/cda",
      "name": "CDA (R2)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "xds",
      "uri": "http://ihe.net/xds",
      "name": "XDS metadata equivalent"
    }
  ],
  "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.status",
        "path": "DocumentReference.status",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.type",
        "path": "DocumentReference.type",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.category",
        "path": "DocumentReference.category",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.subject",
        "path": "DocumentReference.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Group",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://fhir.smart4health.eu/StructureDefinition/s4h-patient",
              "http://hl7.org/fhir/uv/ips/StructureDefinition/Practitioner-uv-ips"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.date",
        "path": "DocumentReference.date",
        "requirements": "Within the Smart4Health project, the creation date needed to properly place the document within a complete patient record.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DocumentReference.author",
        "path": "DocumentReference.author",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.org/fhir/uv/ips/StructureDefinition/Practitioner-uv-ips",
              "http://hl7.org/fhir/uv/ips/StructureDefinition/PractitionerRole-uv-ips",
              "http://fhir.smart4health.eu/StructureDefinition/s4h-patient",
              "http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.custodian",
        "path": "DocumentReference.custodian",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/uv/ips/StructureDefinition/Organization-uv-ips"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.relatesTo",
        "path": "DocumentReference.relatesTo",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.relatesTo.target",
        "path": "DocumentReference.relatesTo.target",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://fhir.smart4health.eu/StructureDefinition/s4h-documentreference"
            ]
          }
        ]
      },
      {
        "id": "DocumentReference.description",
        "path": "DocumentReference.description",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content",
        "path": "DocumentReference.content",
        "requirements": "Smart4Health: The use and interpretation of multiple content elements is currently difficult and unclear. To avoid confusion and incorrect use, it is therefore restricted to a single element with the Smart4Health context.",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.content.attachment",
        "path": "DocumentReference.content.attachment",
        "type": [
          {
            "code": "Attachment",
            "profile": [
              "http://fhir.smart4health.eu/StructureDefinition/s4h-attachment"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context",
        "path": "DocumentReference.context",
        "mustSupport": true
      },
      {
        "id": "DocumentReference.context.encounter",
        "path": "DocumentReference.context.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare",
              "http://fhir.smart4health.eu/StructureDefinition/s4h-encounter"
            ]
          }
        ],
        "mustSupport": true
      }
    ]
  }
}