{
  "resourceType": "StructureDefinition",
  "id": "zd-referralrequest",
  "url": "http://zorgdomein.nl/fhir/StructureDefinition/zd-referralrequest",
  "name": "ZD ReferralRequest",
  "status": "draft",
  "date": "2017-03-01T11:00:00+00:00",
  "publisher": "ZorgDomein",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "https://zorgdomein.nl"
        },
        {
          "system": "email",
          "value": "io@zorgdomein.nl"
        }
      ]
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "ReferralRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/ReferralRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "ReferralRequest",
        "path": "ReferralRequest",
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.extension",
        "path": "ReferralRequest.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "ReferralRequest.extension:preferredspecialist",
        "path": "ReferralRequest.extension",
        "sliceName": "preferredspecialist",
        "short": "The preferred specialist that was specified in the request",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-preferredspecialist"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:supplyelement",
        "path": "ReferralRequest.extension",
        "sliceName": "supplyelement",
        "short": "ZorgDomein supply element belonging to the healthcare product",
        "min": 1,
        "type": [
          {
            "code": "Extension",
            "profile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-supplyelement"
          }
        ]
      },
      {
        "id": "ReferralRequest.extension:cluster",
        "path": "ReferralRequest.extension",
        "sliceName": "cluster",
        "short": "ZorgDomein cluster to which the healthcare product belongs",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-cluster"
          }
        ]
      },
      {
        "id": "ReferralRequest.identifier",
        "path": "ReferralRequest.identifier",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.identifier.system",
        "path": "ReferralRequest.identifier.system",
        "min": 1,
        "fixedUri": "http://zorgdomein.nl/zdnumber/"
      },
      {
        "id": "ReferralRequest.identifier.value",
        "path": "ReferralRequest.identifier.value",
        "short": "The ZD Number corresponding to this document",
        "min": 1
      },
      {
        "id": "ReferralRequest.status",
        "path": "ReferralRequest.status",
        "definition": "The workflow status of the referral or transfer of care request. Only requested and cancelled will be sent by ZorgDomein",
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.intent",
        "path": "ReferralRequest.intent",
        "fixedCode": "plan"
      },
      {
        "id": "ReferralRequest.type",
        "path": "ReferralRequest.type",
        "short": "Code and name of healthcareproduct type",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.type.coding",
        "path": "ReferralRequest.type.coding",
        "short": "Code of healthcareproduct type",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ReferralRequest.type.coding.code",
        "path": "ReferralRequest.type.coding.code",
        "min": 1
      },
      {
        "id": "ReferralRequest.type.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.type.text",
        "short": "Name of healthcareproduct type"
      },
      {
        "id": "ReferralRequest.priority",
        "path": "ReferralRequest.priority",
        "min": 1
      },
      {
        "id": "ReferralRequest.serviceRequested",
        "path": "ReferralRequest.serviceRequested",
        "short": "Code and name of the healthcare product",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.serviceRequested.coding",
        "path": "ReferralRequest.serviceRequested.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "ReferralRequest.serviceRequested.coding.code",
        "path": "ReferralRequest.serviceRequested.coding.code",
        "min": 1
      },
      {
        "id": "ReferralRequest.serviceRequested.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.serviceRequested.text",
        "short": "Plain text representation of the actions requested as part of the referral"
      },
      {
        "id": "ReferralRequest.subject",
        "path": "ReferralRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-patient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.occurrence[x]:occurrencePeriod",
        "path": "ReferralRequest.occurrencePeriod",
        "sliceName": "occurrencePeriod",
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "ReferralRequest.occurrence[x]:occurrencePeriod.start",
        "path": "ReferralRequest.occurrencePeriod.start",
        "short": "Transaction date plus access time in days"
      },
      {
        "id": "ReferralRequest.authoredOn",
        "path": "ReferralRequest.authoredOn",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.requester",
        "path": "ReferralRequest.requester",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.requester.agent",
        "path": "ReferralRequest.requester.agent",
        "short": "Responsible practitioner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-practitioner"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.requester.onBehalfOf",
        "path": "ReferralRequest.requester.onBehalfOf",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-organization"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.recipient",
        "path": "ReferralRequest.recipient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://zorgdomein.nl/fhir/StructureDefinition/zd-organization"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.reasonCode",
        "path": "ReferralRequest.reasonCode",
        "short": "Code and full path of the healthcare request menu item",
        "mustSupport": true
      },
      {
        "id": "ReferralRequest.reasonCode.coding",
        "path": "ReferralRequest.reasonCode.coding",
        "short": "Reason code defined by a terminology system"
      },
      {
        "id": "ReferralRequest.reasonCode.coding.code",
        "path": "ReferralRequest.reasonCode.coding.code",
        "min": 1
      },
      {
        "id": "ReferralRequest.reasonCode.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "ReferralRequest.reasonCode.text",
        "short": "Plain text representation of the reason code"
      }
    ]
  }
}