{
  "resourceType": "StructureDefinition",
  "id": "908d049f-d210-4efd-a94a-2280332d3d2b",
  "meta": {
    "lastUpdated": "2020-11-19T12:48:45.662+00:00"
  },
  "url": "http://nhn.no/kj/fhir/StructureDefinition/KjDeviceUseStatement",
  "name": "KjDeviceUseStatement",
  "status": "active",
  "date": "2020-10-06T07:18:53.5558673+00:00",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "quick",
      "uri": "http://siframework.org/cqf",
      "name": "Quality Improvement and Clinical Knowledge (QUICK)"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "DeviceUseStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DeviceUseStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "DeviceUseStatement.extension",
        "path": "DeviceUseStatement.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "DeviceUseStatement.extension:validUntil",
        "path": "DeviceUseStatement.extension",
        "sliceName": "validUntil",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://nhn.no/kj/fhir/StructureDefinition/KjValidUntil"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.extension:validUntil.value[x]",
        "path": "DeviceUseStatement.extension.value[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "DeviceUseStatement.extension:updater",
        "path": "DeviceUseStatement.extension",
        "sliceName": "updater",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://nhn.no/kj/fhir/StructureDefinition/KjUpdater"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.extension:updatedDateTime",
        "path": "DeviceUseStatement.extension",
        "sliceName": "updatedDateTime",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://nhn.no/kj/fhir/StructureDefinition/KjUpdatedDateTime"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.extension:sourceOfInformation",
        "path": "DeviceUseStatement.extension",
        "sliceName": "sourceOfInformation",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://nhn.no/kj/fhir/StructureDefinition/KjSourceOfInformation"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.extension:implanted",
        "path": "DeviceUseStatement.extension",
        "sliceName": "implanted",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://nhn.no/kj/fhir/StructureDefinition/KjImplanted"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.identifier",
        "path": "DeviceUseStatement.identifier",
        "max": "1"
      },
      {
        "id": "DeviceUseStatement.basedOn",
        "path": "DeviceUseStatement.basedOn",
        "max": "1"
      },
      {
        "id": "DeviceUseStatement.status",
        "path": "DeviceUseStatement.status",
        "short": "active | completed | entered-in-error",
        "mustSupport": true,
        "binding": {
          "strength": "required",
          "valueSet": "http://nhn.no/kj/fhir/ValueSet/DeviceUseStatementStatus"
        }
      },
      {
        "id": "DeviceUseStatement.subject",
        "path": "DeviceUseStatement.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.no/fhir/StructureDefinition/no-basis-Patient"
            ],
            "aggregation": [
              "referenced"
            ],
            "versioning": "independent"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.derivedFrom",
        "path": "DeviceUseStatement.derivedFrom",
        "max": "1"
      },
      {
        "id": "DeviceUseStatement.recordedOn",
        "path": "DeviceUseStatement.recordedOn",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.source",
        "path": "DeviceUseStatement.source",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://nhn.no/kj/fhir/StructureDefinition/KjPractitionerRole"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.source.reference",
        "path": "DeviceUseStatement.source.reference",
        "min": 1
      },
      {
        "id": "DeviceUseStatement.source.type",
        "path": "DeviceUseStatement.source.type",
        "fixedUri": "http://nhn.no/kj/fhir/StructureDefinition/KjPractitionerRole"
      },
      {
        "id": "DeviceUseStatement.source.identifier",
        "path": "DeviceUseStatement.source.identifier",
        "max": "0"
      },
      {
        "id": "DeviceUseStatement.device",
        "path": "DeviceUseStatement.device",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://nhn.no/kj/fhir/StructureDefinition/KjDevice"
            ],
            "aggregation": [
              "contained"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.device.reference",
        "path": "DeviceUseStatement.device.reference",
        "min": 1
      },
      {
        "id": "DeviceUseStatement.note",
        "path": "DeviceUseStatement.note",
        "max": "1",
        "constraint": [
          {
            "key": "kj-dus-1",
            "severity": "error",
            "human": "If note is present, then text must be between 4 and 500 characters.",
            "expression": "empty() or (first().text.value.length() >=4 and first().text.value.length() <= 500)",
            "xpath": "http://nhn.no/kj/fhir/StructureDefinition/DeviceUseStatement",
            "source": "http://nhn.no/kj/fhir/StructureDefinition/KjDeviceUseStatement"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "DeviceUseStatement.note.author[x]",
        "path": "DeviceUseStatement.note.author[x]",
        "max": "0"
      },
      {
        "id": "DeviceUseStatement.note.time",
        "path": "DeviceUseStatement.note.time",
        "max": "0"
      }
    ]
  }
}