﻿{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://hl7.org/fhir/json-schema/Device",
  "$ref": "#/definitions/Device",
  "description": "see http://hl7.org/fhir/json.html#schema for information about the FHIR Json Schemas",
  "definitions": {
    "Device": {
      "allOf": [
        {
          "$ref": "DomainResource.schema.json/definitions/DomainResource"
        },
        {
          "description": "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 includes 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.",
          "properties": {
            "resourceType": {
              "description": "This is a Device resource",
              "type": "string",
              "enum": [
                "Device"
              ]
            },
            "identifier": {
              "description": "Unique instance identifiers assigned to a device by manufacturers other organizations or owners.",
              "type": "array",
              "items": {
                "$ref": "Identifier.schema.json/definitions/Identifier"
              }
            },
            "udiCarrier": {
              "description": "[Unique device identifier (UDI)](device.html#5.11.3.2.2) barcode or rfid string assigned to device label or package.",
              "$ref": "Identifier.schema.json/definitions/Identifier"
            },
            "status": {
              "description": "Status of the Device availability.",
              "type": "string",
              "pattern": "[^\\s]+([\\s]?[^\\s]+)*"
            },
            "status_": {
              "description": "Extensions for status",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "type": {
              "description": "Code or identifier to identify a kind of device.",
              "$ref": "CodeableConcept.schema.json/definitions/CodeableConcept"
            },
            "lotNumber": {
              "description": "Lot number assigned by the manufacturer.",
              "type": "string"
            },
            "lotNumber_": {
              "description": "Extensions for lotNumber",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "manufacturer": {
              "description": "A name of the manufacturer.",
              "type": "string"
            },
            "manufacturer_": {
              "description": "Extensions for manufacturer",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "manufactureDate": {
              "description": "The date and time when the device was manufactured.",
              "type": "string",
              "pattern": "-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?"
            },
            "manufactureDate_": {
              "description": "Extensions for manufactureDate",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "expirationDate": {
              "description": "The date and time beyond which this device is no longer valid or should not be used (if applicable).",
              "type": "string",
              "pattern": "-?[0-9]{4}(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?"
            },
            "expirationDate_": {
              "description": "Extensions for expirationDate",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "model": {
              "description": "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.",
              "type": "string"
            },
            "model_": {
              "description": "Extensions for model",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "version": {
              "description": "The version of the device, if the device has multiple releases under the same model, or if the device is software or carries firmware.",
              "type": "string"
            },
            "version_": {
              "description": "Extensions for version",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "patient": {
              "description": "Patient information, If the device is affixed to a person.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "owner": {
              "description": "An organization that is responsible for the provision and ongoing maintenance of the device.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "contact": {
              "description": "Contact details for an organization or a particular human that is responsible for the device.",
              "type": "array",
              "items": {
                "$ref": "ContactPoint.schema.json/definitions/ContactPoint"
              }
            },
            "location": {
              "description": "The place where the device can be found.",
              "$ref": "Reference.schema.json/definitions/Reference"
            },
            "url": {
              "description": "A network address on which the device may be contacted directly.",
              "type": "string"
            },
            "url_": {
              "description": "Extensions for url",
              "$ref": "Element.schema.json/definitions/Element"
            },
            "note": {
              "description": "Descriptive information, usage information or implantation information that is not captured in an existing element.",
              "type": "array",
              "items": {
                "$ref": "Annotation.schema.json/definitions/Annotation"
              }
            }
          },
          "required": [
            "type",
            "resourceType"
          ]
        }
      ]
    }
  }
}