Class: FHIR::RelatedPersonCommunication
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::RelatedPersonCommunication
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/related_person_communication.rb
Overview
fhir/related_person_communication.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = RelatedPersonCommunication.new) ⇒ Object
26 27 28 29 30 31 32 33 |
# File 'app/models/fhir/related_person_communication.rb', line 26 def self.transform_json(json_hash, target = RelatedPersonCommunication.new) result = self.superclass.transform_json(json_hash, target) result['language'] = CodeableConcept.transform_json(json_hash['language']) unless json_hash['language'].nil? result['preferred'] = PrimitiveBoolean.transform_json(json_hash['preferred'], json_hash['_preferred']) unless json_hash['preferred'].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/related_person_communication.rb', line 8 def as_json(*args) result = super unless self.language.nil? result['language'] = self.language.as_json(*args) end unless self.preferred.nil? result['preferred'] = self.preferred.value serialized = Extension.serializePrimitiveExtension(self.preferred) result['_preferred'] = serialized unless serialized.nil? end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |