{
  "resourceType": "StructureDefinition",
  "id": "zd-task",
  "url": "http://zorgdomein.nl/fhir/StructureDefinition/zd-task",
  "name": "ZD Task",
  "status": "draft",
  "date": "2020-06-17T11:00:00+00:00",
  "publisher": "ZorgDomein",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "https://zorgdomein.com/integrator"
        },
        {
          "system": "email",
          "value": "io@zorgdomein.nl"
        }
      ]
    }
  ],
  "fhirVersion": "3.0.2",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Task",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Task",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Task.basedOn",
        "path": "Task.basedOn",
        "short": "Reference to the related transaction when the task is started in response to a previous transaction"
      },
      {
        "id": "Task.basedOn.identifier",
        "path": "Task.basedOn.identifier",
        "short": "ZD number of the related transaction",
        "min": 1
      },
      {
        "id": "Task.basedOn.identifier.system",
        "path": "Task.basedOn.identifier.system",
        "min": 1,
        "fixedUri": "http://zorgdomein.nl/zdnumber"
      },
      {
        "id": "Task.basedOn.identifier.value",
        "path": "Task.basedOn.identifier.value",
        "min": 1
      },
      {
        "id": "Task.code",
        "path": "Task.code",
        "short": "Specifies the task the user intents to perform when launching ZorgDomein",
        "min": 1,
        "binding": {
          "strength": "extensible",
          "valueSetReference": {
            "reference": "http://zorgdomein.nl/fhir/ValueSet/launch-intent"
          }
        }
      },
      {
        "id": "Task.for",
        "path": "Task.for",
        "short": "Patient for whom this task is started",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-patient"
          }
        ]
      },
      {
        "id": "Task.owner",
        "path": "Task.owner",
        "short": "Intended recipient of the transaction"
      },
      {
        "id": "Task.owner.identifier",
        "path": "Task.owner.identifier",
        "short": "AGB-code of the intended recipient"
      },
      {
        "id": "Task.owner.identifier.system",
        "path": "Task.owner.identifier.system",
        "min": 1,
        "fixedUri": "http://fhir.nl/fhir/NamingSystem/agb-z"
      },
      {
        "id": "Task.owner.identifier.value",
        "path": "Task.owner.identifier.value",
        "min": 1
      },
      {
        "id": "Task.owner.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Task.owner.display",
        "short": "Name of the intended recipient"
      },
      {
        "id": "Task.input",
        "path": "Task.input",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type.coding.code"
            }
          ],
          "rules": "open"
        },
        "short": "Addtional input parameters for performing the task in ZorgDomein"
      },
      {
        "id": "Task.input:message",
        "path": "Task.input",
        "sliceName": "message",
        "short": "Reference to a pregenerated message or document",
        "max": "1"
      },
      {
        "id": "Task.input:message.type.coding",
        "path": "Task.input.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Task.input:message.type.coding.system",
        "path": "Task.input.type.coding.system",
        "min": 1,
        "fixedUri": "http://zorgdomein.nl/terminology/code-system/launch-input-type"
      },
      {
        "id": "Task.input:message.type.coding.code",
        "path": "Task.input.type.coding.code",
        "min": 1,
        "fixedCode": "message"
      },
      {
        "id": "Task.input:message.value[x]:valueReference",
        "path": "Task.input.valueReference",
        "sliceName": "valueReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-communication"
          }
        ]
      },
      {
        "id": "Task.input:message.value[x]:valueReference.reference",
        "path": "Task.input.valueReference.reference",
        "min": 1
      }
    ]
  }
}