{
  "resourceType": "StructureDefinition",
  "id": "DataStandardsWales-Device",
  "url": "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Device",
  "version": "0.0.2",
  "name": "DataStandardsWalesDevice",
  "title": "Data Standards Wales Device",
  "status": "draft",
  "experimental": true,
  "date": "2024-05-20",
  "publisher": "NHS Wales",
  "copyright": "2024 NHS Wales.",
  "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"
        }
      },
      {
        "id": "Device.identifier:applicationInstanceId",
        "path": "Device.identifier",
        "sliceName": "applicationInstanceId",
        "short": "The Id of the application instance used",
        "definition": "The Id of the application instance used",
        "requirements": "Systems are almost always assigned specific numerical identifiers.",
        "max": "1"
      },
      {
        "id": "Device.identifier:applicationInstanceId.system",
        "path": "Device.identifier.system",
        "min": 1,
        "fixedUri": "https://fhir.nhs.wales/Id/application-instance-identifier"
      },
      {
        "id": "Device.identifier:applicationInstanceId.value",
        "path": "Device.identifier.value",
        "min": 1
      },
      {
        "id": "Device.identifier:applicationInstanceId.assigner",
        "path": "Device.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization"
            ]
          }
        ]
      },
      {
        "id": "Device.status",
        "path": "Device.status",
        "mustSupport": true
      },
      {
        "id": "Device.type",
        "path": "Device.type",
        "mustSupport": true
      },
      {
        "id": "Device.patient",
        "path": "Device.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient"
            ]
          }
        ]
      },
      {
        "id": "Device.owner",
        "path": "Device.owner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization"
            ]
          }
        ]
      },
      {
        "id": "Device.location",
        "path": "Device.location",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Location"
            ]
          }
        ]
      },
      {
        "id": "Device.note.author[x]",
        "path": "Device.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Practitioner",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-RelatedPerson",
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization"
            ]
          },
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Device.parent",
        "path": "Device.parent",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Device"
            ]
          }
        ]
      }
    ]
  }
}