Class: FHIR::CompositionRelatesTo
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::CompositionRelatesTo
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/composition_relates_to.rb
Overview
fhir/composition_relates_to.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = CompositionRelatesTo.new) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'app/models/fhir/composition_relates_to.rb', line 30 def self.transform_json(json_hash, target = CompositionRelatesTo.new) result = self.superclass.transform_json(json_hash, target) result['code'] = DocumentRelationshipType.transform_json(json_hash['code'], json_hash['_code']) unless json_hash['code'].nil? result['targetIdentifier'] = Identifier.transform_json(json_hash['targetIdentifier']) unless json_hash['targetIdentifier'].nil? result['targetReference'] = Reference.transform_json(json_hash['targetReference']) unless json_hash['targetReference'].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 |
# File 'app/models/fhir/composition_relates_to.rb', line 9 def as_json(*args) result = super unless self.code.nil? result['code'] = self.code.value serialized = Extension.serializePrimitiveExtension(self.code) result['_code'] = serialized unless serialized.nil? end unless self.targetIdentifier.nil? result['targetIdentifier'] = self.targetIdentifier.as_json(*args) end unless self.targetReference.nil? result['targetReference'] = self.targetReference.as_json(*args) end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |