Class: FHIR::TestReportParticipant
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::TestReportParticipant
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/test_report_participant.rb
Overview
fhir/test_report_participant.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = TestReportParticipant.new) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'app/models/fhir/test_report_participant.rb', line 34 def self.transform_json(json_hash, target = TestReportParticipant.new) result = self.superclass.transform_json(json_hash, target) result['type'] = TestReportParticipantType.transform_json(json_hash['type'], json_hash['_type']) unless json_hash['type'].nil? result['uri'] = PrimitiveUri.transform_json(json_hash['uri'], json_hash['_uri']) unless json_hash['uri'].nil? result['display'] = PrimitiveString.transform_json(json_hash['display'], json_hash['_display']) unless json_hash['display'].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/test_report_participant.rb', line 9 def as_json(*args) result = super unless self.type.nil? result['type'] = self.type.value serialized = Extension.serializePrimitiveExtension(self.type) result['_type'] = serialized unless serialized.nil? end unless self.uri.nil? result['uri'] = self.uri.value serialized = Extension.serializePrimitiveExtension(self.uri) result['_uri'] = serialized unless serialized.nil? end unless self.display.nil? result['display'] = self.display.value serialized = Extension.serializePrimitiveExtension(self.display) result['_display'] = serialized unless serialized.nil? end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |