{
  "resourceType": "StructureDefinition",
  "id": "nl-vzvz-Device",
  "language": "nl-NL",
  "url": "http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-Device",
  "version": "4.0.0-beta.1",
  "name": "NLVZVZDevice",
  "status": "draft",
  "publisher": "VZVZ",
  "contact": [
    {
      "name": "VZVZ",
      "telecom": [
        {
          "system": "email",
          "value": "standaardisatie@vzvz.nl",
          "use": "work"
        }
      ]
    }
  ],
  "description": "Device profile as used in AORTA and outside the AORTA infra",
  "jurisdiction": [
    {
      "coding": [
        {
          "code": "NL",
          "system": "urn:iso:std:iso:3166",
          "display": "Netherlands"
        }
      ]
    }
  ],
  "copyright": "VZVZ",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Device",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Device",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Device.identifier",
        "path": "Device.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "definition": "Business identifier of the Device",
        "comment": "If this identifier defines a Device the AORTA infrastructure the identifier represents the applicationid,\n  notherwise the identifier conforms to the system/value defined by the relevant infrastructure",
        "min": 1,
        "max": "1",
        "example": [
          {
            "label": "AORTA application ID",
            "valueIdentifier": {
              "system": "http://fhir.nl/fhir/NamingSystem/aorta-app-id",
              "value": "12345678"
            }
          },
          {
            "label": "OID based identifier of a non-AORTA device",
            "valueIdentifier": {
              "system": "urn:ietf:rfc:3986",
              "value": "urn:oid:2.16.840.1.113883.1.2.3.45678"
            }
          }
        ]
      },
      {
        "id": "Device.identifier:aorta-app-id",
        "path": "Device.identifier",
        "sliceName": "aorta-app-id",
        "short": "applicationID",
        "definition": "This identifier identifies the Device in the AORTA infrastructure",
        "comment": "Use this slice to identify a device with its AORTA application-ID.\n  Note: the system element can contain either an OID root or a FHIR NamingSystem.\n\n  If the OID variant is uses the system element MUST contain the OID root and the value element MUST contain the OID extension, aka the AORTA application-ID.",
        "min": 0,
        "max": "1",
        "example": [
          {
            "label": "App-ID with FHIR NamingSystem",
            "valueIdentifier": {
              "system": "http://fhir.nl/fhir/NamingSystem/aorta-app-id",
              "value": "12345678"
            }
          },
          {
            "label": "App-ID with OID root",
            "valueIdentifier": {
              "system": "urn:oid:2.16.840.1.113883.2.4.6.6",
              "value": "12345678"
            }
          }
        ],
        "constraint": [
          {
            "key": "aai-01",
            "severity": "error",
            "human": "OID root should be separated from extension for AORTA app-id",
            "source": "http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-Device",
            "expression": "iif($this.system.contains('http://fhir.nl/fhir/NamingSystem/aorta-app-id') or \n$this.system.contains('2.16.840.1.113883.2.4.6.6') or\n$this.system.contains('2.16.840.1.113883.2.4.3.111.3.16'), \n$this.value.contains('2.16.840.1.113883.2.4.6.6').not() and\n$this.value.contains('2.16.840.1.113883.2.4.3.111.3.16').not()\n,true)"
          }
        ]
      },
      {
        "id": "Device.identifier:aorta-app-id.system",
        "path": "Device.identifier.system",
        "binding": {
          "strength": "required",
          "valueSet": "http://vzvz.nl/fhir/ValueSet/aorta-device"
        }
      },
      {
        "id": "Device.deviceName",
        "path": "Device.deviceName",
        "definition": "The deviceName is not used because the ValueSet of the deviceName.type is experimental\nand this profile should not be considered experimental.",
        "max": "0"
      },
      {
        "id": "Device.owner",
        "path": "Device.owner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider-Organization"
            ]
          }
        ],
        "constraint": [
          {
            "key": "only-ura-01",
            "severity": "error",
            "human": "System must be the canonical URL or OID defined in NamingSystem ura",
            "expression": "reference.exists() or identifier.where(system = 'http://fhir.nl/fhir/NamingSystem/ura' or system = 'urn:oid:2.16.528.1.1007.3.3').exists()",
            "source": "http://vzvz.nl/fhir/StructureDefinition/nl-vzvz-Device"
          }
        ]
      }
    ]
  }
}