Class: FHIR::RiskEvidenceSynthesisRiskEstimatePrecisionEstimate
- Inherits:
-
BackboneElement
- Object
- Type
- Element
- BackboneElement
- FHIR::RiskEvidenceSynthesisRiskEstimatePrecisionEstimate
- Includes:
- Mongoid::Document
- Defined in:
- app/models/fhir/risk_evidence_synthesis_risk_estimate_precision_estimate.rb
Overview
fhir/risk_evidence_synthesis_risk_estimate_precision_estimate.rb
Class Method Summary collapse
- .transform_json(json_hash, target = RiskEvidenceSynthesisRiskEstimatePrecisionEstimate.new) ⇒ Object
Instance Method Summary collapse
Class Method Details
.transform_json(json_hash, target = RiskEvidenceSynthesisRiskEstimatePrecisionEstimate.new) ⇒ Object
38 39 40 41 42 43 44 45 46 47 |
# File 'app/models/fhir/risk_evidence_synthesis_risk_estimate_precision_estimate.rb', line 38 def self.transform_json(json_hash, target = RiskEvidenceSynthesisRiskEstimatePrecisionEstimate.new) result = self.superclass.transform_json(json_hash, target) result['type'] = CodeableConcept.transform_json(json_hash['type']) unless json_hash['type'].nil? result['level'] = PrimitiveDecimal.transform_json(json_hash['level'], json_hash['_level']) unless json_hash['level'].nil? result['from'] = PrimitiveDecimal.transform_json(json_hash['from'], json_hash['_from']) unless json_hash['from'].nil? result['to'] = PrimitiveDecimal.transform_json(json_hash['to'], json_hash['_to']) unless json_hash['to'].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 35 36 |
# File 'app/models/fhir/risk_evidence_synthesis_risk_estimate_precision_estimate.rb', line 10 def as_json(*args) result = super unless self.type.nil? result['type'] = self.type.as_json(*args) end unless self.level.nil? result['level'] = self.level.value serialized = Extension.serializePrimitiveExtension(self.level) result['_level'] = serialized unless serialized.nil? end unless self.from.nil? result['from'] = self.from.value serialized = Extension.serializePrimitiveExtension(self.from) result['_from'] = serialized unless serialized.nil? end unless self.to.nil? result['to'] = self.to.value serialized = Extension.serializePrimitiveExtension(self.to) result['_to'] = serialized unless serialized.nil? end result.delete('id') unless self.fhirId.nil? result['id'] = self.fhirId result.delete('fhirId') end result end |