Class: FHIR::MessageHeaderDestination
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::MessageHeaderDestination
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/message_header_destination.rb
Overview
fhir/message_header_destination.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = MessageHeaderDestination.new) ⇒ Object
36 37 38 39 40 41 42 43 44 45 |
# File 'app/models/fhir/message_header_destination.rb', line 36 def self.transform_json(json_hash, target = MessageHeaderDestination.new) result = self.superclass.transform_json(json_hash, target) result['name'] = PrimitiveString.transform_json(json_hash['name'], json_hash['_name']) unless json_hash['name'].nil? result['target'] = Reference.transform_json(json_hash['target']) unless json_hash['target'].nil? result['endpoint'] = PrimitiveUrl.transform_json(json_hash['endpoint'], json_hash['_endpoint']) unless json_hash['endpoint'].nil? result['receiver'] = Reference.transform_json(json_hash['receiver']) unless json_hash['receiver'].nil? result end |
Instance Method Details
#as_json(*args) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/models/fhir/message_header_destination.rb', line 10 def as_json(*args) result = super unless self.name.nil? result['name'] = self.name.value serialized = Extension.serializePrimitiveExtension(self.name) result['_name'] = serialized unless serialized.nil? end unless self.target.nil? result['target'] = self.target.as_json(*args) end unless self.endpoint.nil? result['endpoint'] = self.endpoint.value serialized = Extension.serializePrimitiveExtension(self.endpoint) result['_endpoint'] = serialized unless serialized.nil? end unless self.receiver.nil? result['receiver'] = self.receiver.as_json(*args) end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |