PackagesCanonicalsLogsProblems
    Packages
    socialcaredataservice.stu3@0.0.2
    https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CDS-Device
{
  "description": "Constrained version of FHIR revice Resource to support the CareDataService (CDS). The CDS-Device resource is used to share details of equipment or modification that the Local Authority has povided to the patient.",
  "_filename": "CDS-Device.json",
  "package_name": "socialcaredataservice.stu3",
  "date": "2020-02-05T09:16:59.7138568+00:00",
  "derivation": "constraint",
  "meta": {
    "lastUpdated": "2020-02-07T10:20:13.057+00:00"
  },
  "publisher": null,
  "fhirVersion": "3.0.2",
  "name": "CDS-Device",
  "mapping": [ {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  }, {
    "uri": "http://hl7.org/fhir/w5",
    "name": "W5 Mapping",
    "identity": "w5"
  }, {
    "uri": "http://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/UniqueDeviceIdentification/default.htm",
    "name": "UDI Mapping",
    "identity": "udi"
  } ],
  "abstract": false,
  "copyright": "Copyright © Nottinghamshire County Council 2020",
  "type": "Device",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": null,
  "package_version": "0.0.2",
  "snapshot": {
    "element": [ {
      "constraint": [ {
        "key": "dom-2",
        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        "xpath": "not(parent::f:contained and f:contained)",
        "severity": "error",
        "expression": "contained.contained.empty()"
      }, {
        "key": "dom-1",
        "human": "If the resource is contained in another resource, it SHALL NOT contain any narrative",
        "xpath": "not(parent::f:contained and f:text)",
        "severity": "error",
        "expression": "contained.text.empty()"
      }, {
        "key": "dom-4",
        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
        "severity": "error",
        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"
      }, {
        "key": "dom-3",
        "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource",
        "xpath": "not(exists(for $id in f:contained/*/@id return $id[not(ancestor::f:contained/parent::*/descendant::f:reference/@value=concat('#', $id))]))",
        "severity": "error",
        "expression": "contained.where(('#'+id in %resource.descendants().reference).not()).empty()"
      } ],
      "path": "Device",
      "min": 0,
      "definition": "This resource identifies an instance or a type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device.  Medical devices include durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research for healthcare and public health.  Non-medical devices may include items such as a machine, cellphone, computer, application, etc.",
      "short": "Item used in healthcare",
      "mapping": [ {
        "map": "Entity. Role, or Act",
        "identity": "rim"
      }, {
        "map": "Device",
        "identity": "rim"
      }, {
        "map": "administrative.device",
        "identity": "w5"
      } ],
      "max": "*",
      "id": "Device",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Resource"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.id",
      "min": 1,
      "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
      "short": "Logical id of this artifact",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "id"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Device.id",
      "condition": [ "ele-1" ],
      "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.id"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.meta",
      "min": 0,
      "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.",
      "short": "Metadata about the resource",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Meta"
      } ],
      "max": "1",
      "id": "Device.meta",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.meta"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.implicitRules",
      "min": 0,
      "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.",
      "isModifier": true,
      "short": "A set of rules under which this content was created",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Device.implicitRules",
      "condition": [ "ele-1" ],
      "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. \n\nThis element is labelled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.implicitRules"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.language",
      "min": 0,
      "definition": "The base language in which the resource is written.",
      "short": "Language of the resource content",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "extensible",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueReference": {
            "reference": "http://hl7.org/fhir/ValueSet/all-languages"
          }
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Language"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
          "valueBoolean": true
        } ],
        "description": "A human language.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/languages"
        }
      },
      "max": "1",
      "id": "Device.language",
      "condition": [ "ele-1" ],
      "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource  Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.language"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.text",
      "min": 0,
      "definition": "A human-readable narrative that contains a summary of the resource, and may be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
      "short": "Text summary of the resource, for human interpretation",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      }, {
        "map": "Act.text?",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Narrative"
      } ],
      "alias": [ "narrative", "html", "xhtml", "display" ],
      "max": "1",
      "id": "Device.text",
      "condition": [ "ele-1", "dom-1" ],
      "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded in formation is added later.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DomainResource.text"
      }
    }, {
      "path": "Device.contained",
      "min": 0,
      "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
      "short": "Contained, inline Resources",
      "mapping": [ {
        "map": "Entity. Role, or Act",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Resource"
      } ],
      "alias": [ "inline resources", "anonymous resources", "contained resources" ],
      "max": "*",
      "id": "Device.contained",
      "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.contained"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Device.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the resource. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Device.extension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Device.modifierExtension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the resource, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
      "isModifier": true,
      "short": "Extensions that cannot be ignored",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Device.modifierExtension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.modifierExtension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.identifier",
      "min": 0,
      "definition": "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.",
      "short": "Instance identifier",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)",
        "identity": "v2"
      }, {
        "map": "II - see see identifier pattern at http://wiki.hl7.org/index.php?title=Common_Design_Patterns#Identifier_Pattern for relevant discussion. The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]",
        "identity": "rim"
      }, {
        "map": "Identifier",
        "identity": "servd"
      }, {
        "map": "The serial number which is a component of the production identifier (PI), a conditional, variable portion of a UDI.   The identifier.type code should be set to “SNO”(Serial Number) and the system left empty.",
        "identity": "udi"
      }, {
        "map": ".id",
        "identity": "rim"
      }, {
        "map": "id",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "alias": [ "Serial Number" ],
      "max": "*",
      "id": "Device.identifier",
      "condition": [ "ele-1" ],
      "comment": "The barcode string from a barcode present on a device label or package may identify the instance, include names given to the device in local usage, or may identify the type of device. If the identifier identifies the type of device, Device.type element should be used.  For [UDI](device.html#5.11.3.2.2),  this element corresponds to the variable portion of the UDI that identifies the serial number of a specific device. See [UDI mappings](device-mappings.html#udi) for a complete mapping of UDI parts to Device.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Device.identifier"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi",
      "min": 0,
      "definition": "[Unique device identifier (UDI)](device.html#5.11.3.2.2) assigned to device label or package.",
      "short": "Unique Device Identifier (UDI) Barcode string",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": ".id and .code",
        "identity": "rim"
      }, {
        "map": "id",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "max": "1",
      "id": "Device.udi",
      "condition": [ "ele-1" ],
      "comment": "UDI may identify an unique instance of a device, or it may only identify the type of the device.  See [UDI mappings](device-mappings.html#udi) for a complete mapping of UDI parts to Device.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Device.udi.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Device.udi.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Device.udi.extension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Device.udi.modifierExtension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.",
      "isModifier": true,
      "short": "Extensions that cannot be ignored",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "Device.udi.modifierExtension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.deviceIdentifier",
      "min": 0,
      "definition": "The device identifier (DI) is a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.",
      "short": "Mandatory fixed portion of UDI",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The device identifier (DI), a mandatory, fixed portion of a UDI that identifies the labeler and the specific version or model of a device.",
        "identity": "udi"
      }, {
        "map": "Role.id.extension",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "alias": [ "DI" ],
      "max": "1",
      "id": "Device.udi.deviceIdentifier",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi.deviceIdentifier"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.name",
      "min": 0,
      "definition": "Name of device as used in labeling or catalog.",
      "short": "Device Name as appears on UDI label",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Propietary/Trade Name of the medical Device as used in the labeling or catalog",
        "identity": "udi"
      }, {
        "map": ".displayName",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "alias": [ "Brand Name" ],
      "max": "1",
      "id": "Device.udi.name",
      "condition": [ "ele-1" ],
      "comment": "Use the `Device.type`  for a generic type or kind of device name.  Note the [GUDID](http://www.fda.gov/medicaldevices/deviceregulationandguidance/uniquedeviceidentification/globaludidatabasegudid/default.htm) lists the name as the 'Brand Name'.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi.name"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.jurisdiction",
      "requirements": "Allows a recipient of a UDI to know which database will contain the UDI-associated metadata.",
      "min": 0,
      "definition": "The identity of the authoritative source for UDI generation within a  jurisdiction.  All UDIs are globally unique within a single namespace. with the appropriate repository uri as the system.  For example,  UDIs of devices managed in the U.S. by the FDA, the value is  http://hl7.org/fhir/NamingSystem/fda-udi.",
      "short": "Regional UDI authority",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Role.scoper",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Device.udi.jurisdiction",
      "condition": [ "ele-1" ],
      "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi.jurisdiction"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.carrierHRF",
      "min": 0,
      "definition": "The full UDI carrier as the human readable form (HRF) representation of the barcode string as printed on the packaging of the device.",
      "short": "UDI Human Readable Barcode String",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "A unique device identifier (UDI) on a device label in plain text",
        "identity": "udi"
      }, {
        "map": "Role.id.extension",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "alias": [ "Human Readable Form" ],
      "max": "1",
      "id": "Device.udi.carrierHRF",
      "condition": [ "ele-1" ],
      "comment": "If separate barcodes for DI and PI are present, concatenate the string with DI first and in order of human readable expression on label.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi.carrierHRF"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.carrierAIDC",
      "min": 0,
      "definition": "The full UDI carrier of the Automatic Identification and Data Capture (AIDC) technology representation of the barcode string as printed on the packaging of the device - E.g a barcode or RFID.   Because of limitations on character sets in XML and the need to round-trip JSON data through XML, AIDC Formats *SHALL* be base64 encoded.",
      "short": "UDI Machine Readable Barcode String",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "A unique device identifier (UDI) on a device label a form that uses automatic identification and data capture (AIDC) technology.",
        "identity": "udi"
      }, {
        "map": "Role.id.extension",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "base64Binary"
      } ],
      "alias": [ "Automatic Identification and Data Capture" ],
      "max": "1",
      "id": "Device.udi.carrierAIDC",
      "condition": [ "ele-1" ],
      "comment": "The AIDC form of UDIs should be scanned or otherwise used for the identification of the device whenever possible to minimize errors in records resulting from manual transcriptions. If separate barcodes for DI and PI are present, concatenate the string with DI first and in order of human readable expression on label.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi.carrierAIDC"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.issuer",
      "min": 0,
      "definition": "Organization that is charged with issuing UDIs for devices.  For example, the US FDA issuers include :\n1) GS1: \nhttp://hl7.org/fhir/NamingSystem/gs1-di, \n2) HIBCC:\nhttp://hl7.org/fhir/NamingSystem/hibcc-dI, \n3) ICCBBA for blood containers:\nhttp://hl7.org/fhir/NamingSystem/iccbba-blood-di, \n4) ICCBA for other devices:\nhttp://hl7.org/fhir/NamingSystem/iccbba-other-di.",
      "short": "UDI Issuing Organization",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "All UDIs are to be issued under a system operated by an Jurisdiction-accredited issuing agency.\nGS1 DIs: \n http://hl7.org/fhir/NamingSystem/gs1\nHIBCC DIs:\n http://hl7.org/fhir/NamingSystem/hibcc\nICCBBA DIs for blood containers:\n http://hl7.org/fhir/NamingSystem/iccbba-blood\nICCBA DIs for other devices:\n http://hl7.org/fhir/NamingSystem/iccbba-other",
        "identity": "udi"
      }, {
        "map": "Role.id.root",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "alias": [ "Barcode System" ],
      "max": "1",
      "id": "Device.udi.issuer",
      "condition": [ "ele-1" ],
      "comment": "see http://en.wikipedia.org/wiki/Uniform_resource_identifier",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi.issuer"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.udi.entryType",
      "requirements": "Supports a way to distinguish hand entered from machine read data.",
      "min": 0,
      "definition": "A coded entry to indicate how the data was entered.",
      "short": "barcode | rfid | manual +",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "NA",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "UDIEntryType"
        } ],
        "description": "Codes to identify how UDI data was entered",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/udi-entry-type"
        }
      },
      "max": "1",
      "id": "Device.udi.entryType",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.udi.entryType"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.status",
      "min": 0,
      "definition": "Status of the Device availability.",
      "isModifier": true,
      "short": "active | inactive | entered-in-error | unknown",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": ".statusCode",
        "identity": "rim"
      }, {
        "map": "status",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "FHIRDeviceStatus"
        } ],
        "description": "The availability status of the device.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/device-status"
        }
      },
      "max": "1",
      "id": "Device.status",
      "condition": [ "ele-1" ],
      "comment": "This element is labeled as a modifier because the status contains the codes inactive and entered-in-error that mark the device (record)as not currently valid.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.status"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.type",
      "min": 1,
      "definition": "Code or identifier to identify a kind of device.",
      "short": "What kind of device this is",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "Type description using GMDN or other code system",
        "identity": "udi"
      }, {
        "map": ".code",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "DeviceKind"
        } ],
        "description": "Codes to identify medical devices",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/device-kind"
        }
      },
      "max": "1",
      "id": "Device.type",
      "condition": [ "ele-1" ],
      "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.type"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.type.id",
      "min": 0,
      "definition": "unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "xml:id (or equivalent in JSON)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "Device.type.id",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "Device.type.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional Content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "Device.type.extension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.type.coding",
      "requirements": "Allows for translations and alternate encodings within a code system.  Also supports communication of the same instance to systems requiring different encodings.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "Device.type.coding",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.type.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 1,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "Device.type.text",
      "condition": [ "ele-1" ],
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.lotNumber",
      "min": 0,
      "definition": "Lot number assigned by the manufacturer.",
      "short": "Lot number of manufacture",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The lot or batch number within which a device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI.",
        "identity": "udi"
      }, {
        "map": ".lotNumberText",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Device.lotNumber",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.lotNumber"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.manufacturer",
      "min": 0,
      "definition": "A name of the manufacturer.",
      "short": "Name of device manufacturer",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "udi"
      }, {
        "map": ".playedRole[typeCode=MANU].scoper.name",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Device.manufacturer",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.manufacturer"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.manufactureDate",
      "min": 0,
      "definition": "The date and time when the device was manufactured.",
      "short": "Date when the device was made",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The date a specific device was manufactured - which is a component of the production identifier (PI), a conditional, variable portion of a UDI.  For FHIR, The datetime syntax must converted to YYYY-MM-DD[THH:MM:SS].  If hour is present, the minutes and seconds should both be set to “00”.",
        "identity": "udi"
      }, {
        "map": ".existenceTime.low",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "Device.manufactureDate",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.manufactureDate"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.expirationDate",
      "min": 0,
      "definition": "The date and time beyond which this device is no longer valid or should not be used (if applicable).",
      "short": "Date and time of expiry of this device (if applicable)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "the expiration date of a specific device -  which is a component of the production identifier (PI), a conditional, variable portion of a UDI.  For FHIR, The datetime syntax must converted to YYYY-MM-DD[THH:MM:SS].  If hour is present, the minutes and seconds should both be set to “00”.",
        "identity": "udi"
      }, {
        "map": ".expirationTime",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "Device.expirationDate",
      "condition": [ "ele-1" ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.expirationDate"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.model",
      "min": 0,
      "definition": "The \"model\" is an identifier assigned by the manufacturer to identify the product by its type. This number is shared by the all devices sold as the same type.",
      "short": "Model id assigned by the manufacturer",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": ".playedRole[typeCode=MANU].code",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Device.model",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.model"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.version",
      "min": 0,
      "definition": "The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.",
      "short": "Version number (i.e. software)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": ".softwareName (included as part)",
        "identity": "rim"
      }, {
        "map": "what",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "Device.version",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings may not exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.version"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "Device.patient",
      "requirements": "If the device is implanted in a patient, then need to associate the device to the patient.",
      "min": 1,
      "definition": "Patient information, If the device is affixed to a person.",
      "short": "Patient to whom Device is affixed",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": ".playedRole[typeCode=USED].scoper.playedRole[typeCode=PAT]",
        "identity": "rim"
      }, {
        "map": "who.focus",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Patient-1"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "Device.patient",
      "condition": [ "ele-1" ],
      "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.patient"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "Device.owner",
      "min": 0,
      "definition": "An organization that is responsible for the provision and ongoing maintenance of the device.",
      "short": "Organization responsible for device",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": ".playedRole[typeCode=OWN].scoper",
        "identity": "rim"
      }, {
        "map": "who.source",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Organization"
      } ],
      "max": "1",
      "id": "Device.owner",
      "condition": [ "ele-1" ],
      "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.owner"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "cpt-2",
        "human": "A system is required if a value is provided.",
        "xpath": "not(exists(f:value)) or exists(f:system)",
        "severity": "error",
        "expression": "value.empty() or system.exists()"
      } ],
      "path": "Device.contact",
      "min": 0,
      "definition": "Contact details for an organization or a particular human that is responsible for the device.",
      "short": "Details for human/organization for support",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "XTN",
        "identity": "v2"
      }, {
        "map": "TEL",
        "identity": "rim"
      }, {
        "map": "ContactPoint",
        "identity": "servd"
      }, {
        "map": ".scopedRole[typeCode=CON].player",
        "identity": "rim"
      }, {
        "map": "who.source",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "ContactPoint"
      } ],
      "max": "*",
      "id": "Device.contact",
      "condition": [ "ele-1" ],
      "comment": "used for troubleshooting etc.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Device.contact"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %resource.contained.id.trace('ids'))"
      } ],
      "path": "Device.location",
      "requirements": "Device.location can be used to track device location.",
      "min": 0,
      "definition": "The place where the device can be found.",
      "short": "Where the resource is found",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": ".playedRole[typeCode=LOCE].scoper",
        "identity": "rim"
      }, {
        "map": "where",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": "http://hl7.org/fhir/StructureDefinition/Location"
      } ],
      "max": "1",
      "id": "Device.location",
      "condition": [ "ele-1" ],
      "comment": "References SHALL be a reference to an actual FHIR resource, and SHALL be resolveable (allowing for access control, temporary unavailability, etc). Resolution can be either by retrieval from the URL, or, where applicable by resource type, by treating an absolute reference as a canonical URL and looking it up in a local registry/repository.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.location"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.url",
      "min": 0,
      "definition": "A network address on which the device may be contacted directly.",
      "short": "Network address to contact device",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": ".telecom",
        "identity": "rim"
      }, {
        "map": "where",
        "identity": "w5"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "Device.url",
      "condition": [ "ele-1" ],
      "comment": "If the device is running a FHIR server, the network address should  be the Base URL from which a conformance statement may be retrieved.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Device.url"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.note",
      "min": 0,
      "definition": "Descriptive information, usage information or implantation information that is not captured in an existing element.",
      "short": "Device notes and comments",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Act",
        "identity": "rim"
      }, {
        "map": ".text",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Annotation"
      } ],
      "mustSupport": true,
      "max": "*",
      "id": "Device.note",
      "condition": [ "ele-1" ],
      "comment": "For systems that do not have structured annotations, they can simply communicate a single annotation with no author or time.  This element may need to be included in narrative because of the potential for modifying information.  *Annotations SHOULD NOT* be used to communicate \"modifying\" information that could be computable. (This is a SHOULD because enforcing user behavior is nearly impossible).",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Device.note"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "Device.safety",
      "min": 0,
      "definition": "Provides additional safety characteristics about a medical device.  For example devices containing latex.",
      "short": "Safety Characteristics of Device",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "NA",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "DeviceSafety"
        } ],
        "description": "Codes used to identify medical devices safety characterics. These codes are derived in part from the [United States Food and Drug Administration recommendations](http://www.fda.gov/downloads/medicaldevices/deviceregulationandguidance/guidancedocuments/ucm107708.pdf) and are provided here as a suggestive example.",
        "valueSetReference": {
          "reference": "http://hl7.org/fhir/ValueSet/device-safety"
        }
      },
      "max": "*",
      "id": "Device.safety",
      "condition": [ "ele-1" ],
      "comment": "Not all terminology uses fit this general pattern. In some cases, models should not use CodeableConcept and use Coding directly and provide their own structure for managing text, codings, translations and the relationship between elements and pre- and post-coordination.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Device.safety"
      },
      "isSummary": true
    } ]
  },
  "status": "draft",
  "id": "8b7a083b-2f36-4fcf-b4b9-4f5b6a32ffa7",
  "kind": "resource",
  "url": "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CDS-Device",
  "version": "0.0.1",
  "differential": {
    "element": [ {
      "id": "Device.id",
      "min": 1,
      "path": "Device.id",
      "mustSupport": true
    }, {
      "id": "Device.type",
      "min": 1,
      "path": "Device.type",
      "mustSupport": true
    }, {
      "id": "Device.type.text",
      "min": 1,
      "path": "Device.type.text",
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ]
    }, {
      "id": "Device.patient",
      "min": 1,
      "path": "Device.patient",
      "type": [ {
        "code": "Reference",
        "targetProfile": "https://fhir.nottinghamshire.gov.uk/STU3/StructureDefinition/CareConnect-CDS-Patient-1"
      } ],
      "mustSupport": true
    }, {
      "id": "Device.note",
      "path": "Device.note",
      "mustSupport": true
    } ]
  },
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Device"
}