Class: FHIR::ChargeItemDefinitionApplicability

Inherits:
BackboneElement show all
Includes:
Mongoid::Document
Defined in:
app/models/fhir/charge_item_definition_applicability.rb

Overview

fhir/charge_item_definition_applicability.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.transform_json(json_hash, target = ChargeItemDefinitionApplicability.new) ⇒ Object



34
35
36
37
38
39
40
41
42
# File 'app/models/fhir/charge_item_definition_applicability.rb', line 34

def self.transform_json(json_hash, target = ChargeItemDefinitionApplicability.new)

  result = self.superclass.transform_json(json_hash, target)
  result['description'] = PrimitiveString.transform_json(json_hash['description'], json_hash['_description']) unless json_hash['description'].nil?
  result['language'] = PrimitiveString.transform_json(json_hash['language'], json_hash['_language']) unless json_hash['language'].nil?
  result['expression'] = PrimitiveString.transform_json(json_hash['expression'], json_hash['_expression']) unless json_hash['expression'].nil?

  result
end

Instance Method Details

#as_json(*args) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'app/models/fhir/charge_item_definition_applicability.rb', line 9

def as_json(*args)
  result = super      
  unless self.description.nil? 
    result['description'] = self.description.value
    serialized = Extension.serializePrimitiveExtension(self.description)            
    result['_description'] = serialized unless serialized.nil?
  end
  unless self.language.nil? 
    result['language'] = self.language.value
    serialized = Extension.serializePrimitiveExtension(self.language)            
    result['_language'] = serialized unless serialized.nil?
  end
  unless self.expression.nil? 
    result['expression'] = self.expression.value
    serialized = Extension.serializePrimitiveExtension(self.expression)            
    result['_expression'] = serialized unless serialized.nil?
  end
  result.delete('id')
  unless self.fhirId.nil?
    result['id'] = self.fhirId
    result.delete('fhirId')
  end  
  result
end