Class: FHIR::Questionnaire::Item

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

Defined Under Namespace

Classes: EnableWhen, Option

Constant Summary collapse

MULTIPLE_TYPES =
{
  'initial' => ['boolean', 'decimal', 'integer', 'date', 'dateTime', 'instant', 'time', 'string', 'uri', 'Attachment', 'Coding', 'Quantity', 'Reference']
}
METADATA =
{
  'id' => {'type'=>'string', 'path'=>'Item.id', 'min'=>0, 'max'=>1},
  'extension' => {'type'=>'Extension', 'path'=>'Item.extension', 'min'=>0, 'max'=>Float::INFINITY},
  'modifierExtension' => {'type'=>'Extension', 'path'=>'Item.modifierExtension', 'min'=>0, 'max'=>Float::INFINITY},
  'linkId' => {'type'=>'string', 'path'=>'Item.linkId', 'min'=>0, 'max'=>1},
  'concept' => {'valid_codes'=>{'http://loinc.org'=>[]}, 'type'=>'Coding', 'path'=>'Item.concept', 'min'=>0, 'max'=>Float::INFINITY, 'binding'=>{'strength'=>'example', 'uri'=>'http://hl7.org/fhir/ValueSet/questionnaire-questions'}},
  'prefix' => {'type'=>'string', 'path'=>'Item.prefix', 'min'=>0, 'max'=>1},
  'text' => {'type'=>'string', 'path'=>'Item.text', 'min'=>0, 'max'=>1},
  'type' => {'valid_codes'=>{'http://hl7.org/fhir/item-type'=>['group', 'display', 'question', 'boolean', 'decimal', 'integer', 'date', 'dateTime', 'instant', 'time', 'string', 'text', 'url', 'choice', 'open-choice', 'attachment', 'reference', 'quantity', 'group', 'display', 'question']}, 'type'=>'code', 'path'=>'Item.type', 'min'=>1, 'max'=>1, 'binding'=>{'strength'=>'required', 'uri'=>'http://hl7.org/fhir/ValueSet/item-type'}},
  'enableWhen' => {'type'=>'Questionnaire::Item::EnableWhen', 'path'=>'Item.enableWhen', 'min'=>0, 'max'=>Float::INFINITY},
  'required' => {'type'=>'boolean', 'path'=>'Item.required', 'min'=>0, 'max'=>1},
  'repeats' => {'type'=>'boolean', 'path'=>'Item.repeats', 'min'=>0, 'max'=>1},
  'readOnly' => {'type'=>'boolean', 'path'=>'Item.readOnly', 'min'=>0, 'max'=>1},
  'maxLength' => {'type'=>'integer', 'path'=>'Item.maxLength', 'min'=>0, 'max'=>1},
  'options' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/ValueSet'], 'type'=>'Reference', 'path'=>'Item.options', 'min'=>0, 'max'=>1},
  'option' => {'type'=>'Questionnaire::Item::Option', 'path'=>'Item.option', 'min'=>0, 'max'=>Float::INFINITY},
  'initialBoolean' => {'type'=>'boolean', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialDecimal' => {'type'=>'decimal', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialInteger' => {'type'=>'integer', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialDate' => {'type'=>'date', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialDateTime' => {'type'=>'dateTime', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialInstant' => {'type'=>'instant', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialTime' => {'type'=>'time', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialString' => {'type'=>'string', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialUri' => {'type'=>'uri', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialAttachment' => {'type'=>'Attachment', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialCoding' => {'type'=>'Coding', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialQuantity' => {'type'=>'Quantity', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'initialReference' => {'type_profiles'=>['http://hl7.org/fhir/StructureDefinition/Resource'], 'type'=>'Reference', 'path'=>'Item.initial[x]', 'min'=>0, 'max'=>1},
  'item' => {'type'=>'Questionnaire::Item', 'path'=>'Item.item', 'min'=>0, 'max'=>Float::INFINITY}
}

Instance Attribute Summary collapse

Method Summary

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

#conceptObject

0-* [ Coding ]



153
154
155
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 153

def concept
  @concept
end

#enableWhenObject

0-* [ Questionnaire::Item::EnableWhen ]



157
158
159
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 157

def enableWhen
  @enableWhen
end

#extensionObject

0-* [ Extension ]



150
151
152
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 150

def extension
  @extension
end

#idObject

0-1 string



149
150
151
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 149

def id
  @id
end

#initialAttachmentObject

0-1 Attachment



173
174
175
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 173

def initialAttachment
  @initialAttachment
end

#initialBooleanObject

0-1 boolean



164
165
166
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 164

def initialBoolean
  @initialBoolean
end

#initialCodingObject

0-1 Coding



174
175
176
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 174

def initialCoding
  @initialCoding
end

#initialDateObject

0-1 date



167
168
169
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 167

def initialDate
  @initialDate
end

#initialDateTimeObject

0-1 dateTime



168
169
170
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 168

def initialDateTime
  @initialDateTime
end

#initialDecimalObject

0-1 decimal



165
166
167
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 165

def initialDecimal
  @initialDecimal
end

#initialInstantObject

0-1 instant



169
170
171
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 169

def initialInstant
  @initialInstant
end

#initialIntegerObject

0-1 integer



166
167
168
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 166

def initialInteger
  @initialInteger
end

#initialQuantityObject

0-1 Quantity



175
176
177
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 175

def initialQuantity
  @initialQuantity
end

#initialReferenceObject

0-1 Reference(Resource)



176
177
178
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 176

def initialReference
  @initialReference
end

#initialStringObject

0-1 string



171
172
173
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 171

def initialString
  @initialString
end

#initialTimeObject

0-1 time



170
171
172
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 170

def initialTime
  @initialTime
end

#initialUriObject

0-1 uri



172
173
174
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 172

def initialUri
  @initialUri
end

#itemObject

0-* [ Questionnaire::Item ]



177
178
179
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 177

def item
  @item
end

#linkIdObject

0-1 string



152
153
154
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 152

def linkId
  @linkId
end

#maxLengthObject

0-1 integer



161
162
163
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 161

def maxLength
  @maxLength
end

#modifierExtensionObject

0-* [ Extension ]



151
152
153
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 151

def modifierExtension
  @modifierExtension
end

#optionObject

0-* [ Questionnaire::Item::Option ]



163
164
165
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 163

def option
  @option
end

#optionsObject

0-1 Reference(ValueSet)



162
163
164
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 162

def options
  @options
end

#prefixObject

0-1 string



154
155
156
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 154

def prefix
  @prefix
end

#readOnlyObject

0-1 boolean



160
161
162
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 160

def readOnly
  @readOnly
end

#repeatsObject

0-1 boolean



159
160
161
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 159

def repeats
  @repeats
end

#requiredObject

0-1 boolean



158
159
160
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 158

def required
  @required
end

#textObject

0-1 string



155
156
157
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 155

def text
  @text
end

#typeObject

1-1 code



156
157
158
# File 'lib/fhir_models/fhir/resources/Questionnaire.rb', line 156

def type
  @type
end