<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="test-digidot-Device-no" />
  <url value="http://novari.no/fhir/digidot/StructureDefinition/test-digidot-Device-no" />
  <version value="0.1.0-test" />
  <name value="TestDigidotDeviceNo" />
  <title value="TEST DigiDot Device (NO)" />
  <status value="draft" />
  <date value="2026-05-22" />
  <publisher value="Novari AS - DigiDOT" />
  <description value="TEST comparison draft. Not for production use. DigiDOT profile for dental devices that need to be represented as resources, such as implants, prostheses and orthodontic appliances." />
  <purpose value="Use this profile only for dental devices that need their own resource representation, such as implants, prostheses or orthodontic appliances. Routine instruments normally stay outside the shared patient information layer." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Device" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Device" />
  <derivation value="constraint" />
  <differential>
    <element id="Device">
      <path value="Device" />
      <constraint>
        <key value="dev-type-recommended" />
        <severity value="warning" />
        <human value="DigiDOT dental devices should include Device.type when the device is clinically relevant." />
        <expression value="type.exists()" />
      </constraint>
      <constraint>
        <key value="dev-context-recommended" />
        <severity value="warning" />
        <human value="DigiDOT dental devices should normally reference a patient, owner or location so the device context is clear." />
        <expression value="patient.exists() or owner.exists() or location.exists()" />
      </constraint>
    </element>
    <element id="Device.identifier">
      <path value="Device.identifier" />
      <short value="Device identifier when available." />
      <definition value="Use Device.identifier for local device identifiers or supplier identifiers when they are available. Do not invent identifiers for generic device categories that do not need longitudinal tracking." />
    </element>
    <element id="Device.udiCarrier">
      <path value="Device.udiCarrier" />
      <short value="Unique Device Identifier carrier when available." />
    </element>
    <element id="Device.status">
      <path value="Device.status" />
      <short value="FHIR device availability status." />
    </element>
    <element id="Device.manufacturer">
      <path value="Device.manufacturer" />
      <short value="Manufacturer." />
    </element>
    <element id="Device.lotNumber">
      <path value="Device.lotNumber" />
      <short value="Lot or batch number." />
    </element>
    <element id="Device.serialNumber">
      <path value="Device.serialNumber" />
      <short value="Serial number." />
    </element>
    <element id="Device.deviceName">
      <path value="Device.deviceName" />
      <short value="Name used for the device." />
    </element>
    <element id="Device.type">
      <path value="Device.type" />
      <short value="Dental device type." />
      <definition value="Use Device.type for the clinically relevant type of dental device. Prefer agreed SNOMED CT device concepts when available. The temporary DigiDOT test value set can be used while terminology bindings are clarified." />
      <min value="0" />
      <max value="1" />
      <binding>
        <strength value="extensible" />
        <description value="Dental device categories. Use these categories when they cover the intended device; use a more precise SNOMED CT device concept when available." />
        <valueSet value="http://novari.no/fhir/digidot/ValueSet/test-digidot-device-type" />
      </binding>
    </element>
    <element id="Device.patient">
      <path value="Device.patient" />
      <short value="Patient associated with the device." />
      <definition value="Use Device.patient for patient-associated dental devices, such as an implant, prosthesis or orthodontic appliance that belongs to one patient." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element id="Device.owner">
      <path value="Device.owner" />
      <short value="Owning organization." />
      <definition value="Use Device.owner when the device is owned by a clinic, county or other organization rather than being patient-associated." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
    </element>
    <element id="Device.location">
      <path value="Device.location" />
      <short value="Device location." />
      <definition value="Use Device.location for clinic-owned devices or devices whose current physical location is relevant." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.no/fhir/StructureDefinition/no-basis-Location" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
      </type>
    </element>
    <element id="Device.note">
      <path value="Device.note" />
      <short value="Clinical or administrative note." />
    </element>
    <element id="Device.parent">
      <path value="Device.parent" />
      <short value="Parent device." />
      <definition value="Use Device.parent only when a device is a component of another represented device." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://novari.no/fhir/digidot/StructureDefinition/test-digidot-Device-no" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
      </type>
    </element>
  </differential>
</StructureDefinition>