Class: FHIR::Device

Inherits:
Model
  • Object
show all
Includes:
Hashable, Json, Xml
Defined in:
lib/fhir/resources/Device.rb

Constant Summary collapse

SEARCH_PARAMS =
["identifier", "location", "manufacturer", "model", "organization", "patient", "type", "udicarrier", "url"]
METADATA =
{
  'id' => {'type'=>'id', 'path'=>'Device.id', 'min'=>0, 'max'=>1},
  'meta' => {'type'=>'Meta', 'path'=>'Device.meta', 'min'=>0, 'max'=>1},
  'implicitRules' => {'type'=>'uri', 'path'=>'Device.implicitRules', 'min'=>0, 'max'=>1},
  'language' => {'type'=>'code', 'path'=>'Device.language', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'extensible', 'uri'=>'http://hl7.org/fhir/ValueSet/languages'}},
  'text' => {'type'=>'Narrative', 'path'=>'Device.text', 'min'=>0, 'max'=>1},
  'contained' => {'type'=>'Resource', 'path'=>'Device.contained', 'min'=>0, 'max'=>Float::INFINITY},
  'extension' => {'type'=>'Extension', 'path'=>'Device.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Device.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'identifier' => {'type'=>'Identifier', 'path'=>'Device.identifier', 'min'=>0, 'max'=>Float::INFINITY},
  'udiCarrier' => {'type'=>'Identifier', 'path'=>'Device.udiCarrier', 'min'=>0, 'max'=>1},
  'status' => {'valid_codes'=>{'http://hl7.org/fhir/devicestatus'=>['available', 'not-available', 'entered-in-error', 'available', 'not-available', 'entered-in-error']}, 'type'=>'code', 'path'=>'Device.status', 'min'=>0, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/devicestatus'}},
  'type' => {'valid_codes'=>{'http://snomed.info/sct'=>[]}, 'type'=>'CodeableConcept', 'path'=>'Device.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/device-kind'}},
  'lotNumber' => {'type'=>'string', 'path'=>'Device.lotNumber', 'min'=>0, 'max'=>1},
  'manufacturer' => {'type'=>'string', 'path'=>'Device.manufacturer', 'min'=>0, 'max'=>1},
  'manufactureDate' => {'type'=>'dateTime', 'path'=>'Device.manufactureDate', 'min'=>0, 'max'=>1},
  'expirationDate' => {'type'=>'dateTime', 'path'=>'Device.expirationDate', 'min'=>0, 'max'=>1},
  'model' => {'type'=>'string', 'path'=>'Device.model', 'min'=>0, 'max'=>1},
  'version' => {'type'=>'string', 'path'=>'Device.version', 'min'=>0, 'max'=>1},
  'patient' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Patient'], 'type'=>'Reference', 'path'=>'Device.patient', 'min'=>0, 'max'=>1},
  'owner' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Organization'], 'type'=>'Reference', 'path'=>'Device.owner', 'min'=>0, 'max'=>1},
  'contact' => {'type'=>'ContactPoint', 'path'=>'Device.contact', 'min'=>0, 'max'=>Float::INFINITY},
  'location' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Location'], 'type'=>'Reference', 'path'=>'Device.location', 'min'=>0, 'max'=>1},
  'url' => {'type'=>'uri', 'path'=>'Device.url', 'min'=>0, 'max'=>1},
  'note' => {'type'=>'Annotation', 'path'=>'Device.note', 'min'=>0, 'max'=>Float::INFINITY}
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Xml

from_xml, is_valid?, #to_xml, validate

Methods included from Json

from_json, #to_json

Methods included from Hashable

#from_hash, #to_hash

Methods inherited from Model

#attribute_mismatch, #compare_attribute, #equals?, #initialize, #is_valid?, #method_missing, #mismatch, #to_reference, #validate, #validate_profile

Constructor Details

This class inherits a constructor from FHIR::Model

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FHIR::Model

Instance Attribute Details

#contactObject

0-* [ ContactPoint ]



55
56
57
# File 'lib/fhir/resources/Device.rb', line 55

def contact
  @contact
end

#containedObject

0-* [ Resource ]



40
41
42
# File 'lib/fhir/resources/Device.rb', line 40

def contained
  @contained
end

#expirationDateObject

0-1 dateTime



50
51
52
# File 'lib/fhir/resources/Device.rb', line 50

def expirationDate
  @expirationDate
end

#extensionObject

0-* [ Extension ]



41
42
43
# File 'lib/fhir/resources/Device.rb', line 41

def extension
  @extension
end

#idObject

0-1 id



35
36
37
# File 'lib/fhir/resources/Device.rb', line 35

def id
  @id
end

#identifierObject

0-* [ Identifier ]



43
44
45
# File 'lib/fhir/resources/Device.rb', line 43

def identifier
  @identifier
end

#implicitRulesObject

0-1 uri



37
38
39
# File 'lib/fhir/resources/Device.rb', line 37

def implicitRules
  @implicitRules
end

#languageObject

0-1 code



38
39
40
# File 'lib/fhir/resources/Device.rb', line 38

def language
  @language
end

#locationObject

0-1 Reference(Location)



56
57
58
# File 'lib/fhir/resources/Device.rb', line 56

def location
  @location
end

#lotNumberObject

0-1 string



47
48
49
# File 'lib/fhir/resources/Device.rb', line 47

def lotNumber
  @lotNumber
end

#manufactureDateObject

0-1 dateTime



49
50
51
# File 'lib/fhir/resources/Device.rb', line 49

def manufactureDate
  @manufactureDate
end

#manufacturerObject

0-1 string



48
49
50
# File 'lib/fhir/resources/Device.rb', line 48

def manufacturer
  @manufacturer
end

#metaObject

0-1 Meta



36
37
38
# File 'lib/fhir/resources/Device.rb', line 36

def meta
  @meta
end

#modelObject

0-1 string



51
52
53
# File 'lib/fhir/resources/Device.rb', line 51

def model
  @model
end

#modifierExtensionObject

0-* [ Extension ]



42
43
44
# File 'lib/fhir/resources/Device.rb', line 42

def modifierExtension
  @modifierExtension
end

#noteObject

0-* [ Annotation ]



58
59
60
# File 'lib/fhir/resources/Device.rb', line 58

def note
  @note
end

#ownerObject

0-1 Reference(Organization)



54
55
56
# File 'lib/fhir/resources/Device.rb', line 54

def owner
  @owner
end

#patientObject

0-1 Reference(Patient)



53
54
55
# File 'lib/fhir/resources/Device.rb', line 53

def patient
  @patient
end

#statusObject

0-1 code



45
46
47
# File 'lib/fhir/resources/Device.rb', line 45

def status
  @status
end

#textObject

0-1 Narrative



39
40
41
# File 'lib/fhir/resources/Device.rb', line 39

def text
  @text
end

#typeObject

1-1 CodeableConcept



46
47
48
# File 'lib/fhir/resources/Device.rb', line 46

def type
  @type
end

#udiCarrierObject

0-1 Identifier



44
45
46
# File 'lib/fhir/resources/Device.rb', line 44

def udiCarrier
  @udiCarrier
end

#urlObject

0-1 uri



57
58
59
# File 'lib/fhir/resources/Device.rb', line 57

def url
  @url
end

#versionObject

0-1 string



52
53
54
# File 'lib/fhir/resources/Device.rb', line 52

def version
  @version
end

Instance Method Details

#resourceTypeObject



60
61
62
# File 'lib/fhir/resources/Device.rb', line 60

def resourceType
  'Device'
end