{
  "resourceType": "StructureDefinition",
  "id": "nl-vzvz-TaskNotifiedPull",
  "language": "nl-NL",
  "url": "http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-TaskNotifiedPull",
  "version": "2.0.0-beta.2",
  "name": "NLVZVZNotifiedPull",
  "status": "active",
  "publisher": "VZVZ",
  "contact": [
    {
      "name": "VZVZ",
      "telecom": [
        {
          "system": "email",
          "value": "standaardisatie@vzvz.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Task profile for Notified Pull",
  "jurisdiction": [
    {
      "coding": [
        {
          "code": "NL",
          "system": "urn:iso:std:iso:3166",
          "display": "Netherlands"
        }
      ]
    }
  ],
  "copyright": "VZVZ",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Task",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Task",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Task",
        "path": "Task",
        "constraint": [
          {
            "key": "np-1",
            "severity": "error",
            "human": "Restriction should have an end date when status is 'requested'",
            "source": "http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-TaskNotifiedPull",
            "expression": "Task.status='requested' implies Task.restriction.period.end.exists()"
          }
        ]
      },
      {
        "id": "Task.instantiatesUri",
        "path": "Task.instantiatesUri",
        "comment": "Reference to an ActivityDefinition to conform to the TA NP"
      },
      {
        "id": "Task.status",
        "path": "Task.status",
        "fixedCode": "requested"
      },
      {
        "id": "Task.intent",
        "path": "Task.intent",
        "fixedCode": "proposal"
      },
      {
        "id": "Task.code",
        "path": "Task.code",
        "min": 1
      },
      {
        "id": "Task.code.coding.system",
        "path": "Task.code.coding.system",
        "fixedUri": "http://vzvz.nl/fhir/CodeSystem/aorta-taskcode"
      },
      {
        "id": "Task.code.coding.code",
        "path": "Task.code.coding.code",
        "fixedCode": "notified_pull"
      },
      {
        "id": "Task.for",
        "path": "Task.for",
        "short": "Patient",
        "definition": "Reference to the patient to whom this notified pull relates.\r\n\r\nThe entity who benefits from the performance of the service specified in the task (e.g., the patient).",
        "min": 1
      },
      {
        "id": "Task.for.identifier.system",
        "path": "Task.for.identifier.system",
        "fixedUri": "http://fhir.nl/fhir/NamingSystem/bsn"
      },
      {
        "id": "Task.requester",
        "path": "Task.requester",
        "definition": "Reference to Device that requests to execute the Task",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-Device"
            ]
          }
        ]
      },
      {
        "id": "Task.owner",
        "path": "Task.owner",
        "definition": "Reference to Organization responsible for the execution of the Task.",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider-Organization",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/CareTeam",
              "http://hl7.org/fhir/StructureDefinition/HealthcareService",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
            ]
          }
        ]
      },
      {
        "id": "Task.restriction",
        "path": "Task.restriction",
        "short": "Period to execute the task",
        "definition": "Period within which the task should be executed.",
        "comment": "If the status is requested, restriction.period.end should contain an end date to retrieve the information. This end date must be before or on the end date of the consent token."
      },
      {
        "id": "Task.input",
        "path": "Task.input",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "Task.input:consentToken",
        "path": "Task.input",
        "sliceName": "consentToken",
        "short": "consent Token",
        "definition": "The consent token respresents the patient's consent to retrieve this information",
        "comment": "The consent token is base64 encoded (not base64urlencoded).",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Task.input:consentToken.type",
        "path": "Task.input.type",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "consent_token",
              "system": "http://vzvz.nl/fhir/CodeSystem/TaskParameterType"
            }
          ]
        },
        "binding": {
          "strength": "preferred",
          "valueSet": "http://vzvz.nl/fhir/ValueSet/nl-vzvz-TaskParameterType"
        }
      },
      {
        "id": "Task.input:consentToken.value[x]",
        "path": "Task.input.value[x]",
        "short": "base64 encoded consent token",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Task.input:queryString",
        "path": "Task.input",
        "sliceName": "queryString",
        "short": "query string to execute",
        "min": 0,
        "max": "*"
      },
      {
        "id": "Task.input:queryString.type",
        "path": "Task.input.type",
        "patternCodeableConcept": {
          "coding": [
            {
              "code": "query_string",
              "system": "http://vzvz.nl/fhir/CodeSystem/TaskParameterType"
            }
          ]
        },
        "binding": {
          "strength": "preferred",
          "valueSet": "http://vzvz.nl/fhir/ValueSet/nl-vzvz-TaskParameterType"
        }
      },
      {
        "id": "Task.input:queryString.value[x]",
        "path": "Task.input.value[x]",
        "short": "query string to execute",
        "type": [
          {
            "code": "string"
          }
        ]
      }
    ]
  }
}