Class: FHIR::SubstanceSourceMaterialOrganismAuthor

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

Overview

fhir/substance_source_material_organism_author.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

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



26
27
28
29
30
31
32
33
# File 'app/models/fhir/substance_source_material_organism_author.rb', line 26

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

  result = self.superclass.transform_json(json_hash, target)
  result['authorType'] = CodeableConcept.transform_json(json_hash['authorType']) unless json_hash['authorType'].nil?
  result['authorDescription'] = PrimitiveString.transform_json(json_hash['authorDescription'], json_hash['_authorDescription']) unless json_hash['authorDescription'].nil?

  result
end

Instance Method Details

#as_json(*args) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'app/models/fhir/substance_source_material_organism_author.rb', line 8

def as_json(*args)
  result = super      
  unless self.authorType.nil? 
    result['authorType'] = self.authorType.as_json(*args)
  end
  unless self.authorDescription.nil? 
    result['authorDescription'] = self.authorDescription.value
    serialized = Extension.serializePrimitiveExtension(self.authorDescription)            
    result['_authorDescription'] = serialized unless serialized.nil?
  end
  result.delete('id')
  unless self.fhirId.nil?
    result['id'] = self.fhirId
    result.delete('fhirId')
  end  
  result
end