Sha256: 3bde0e346654328cc7e914ebd7f571cc7e30073cc61fee6269f416d7166a38b9

Contents?: true

Size: 1.22 KB

Versions: 17

Compression:

Stored size: 1.22 KB

Contents

require_relative 'module_scope'

module ADIWG
  module Mdtranslator
    module Readers
      module MdJson

        module QuantitativeResult
          def self.unpack(hResult, responseObj, inContext = nil)
            @MessagePath = ADIWG::Mdtranslator::Readers::MdJson::MdJson

            if hResult.empty?
              @MessagePath.issueWarning(80, responseObj, inContext)
              return nil
            end

            intMetadataClass = InternalMetadata.new
            intResult = intMetadataClass.newQuantitativeResult

            if hResult.has_key?('dateTime')
              intResult[:dateTime] = hResult['dateTime']
            end

            if hResult.has_key?('scope')
              intResult[:scope] = Scope.unpack(hResult['scope'], responseObj)
            end

            if hResult.has_key?('value')
              intResult[:value] = hResult['value']
            end

            if hResult.has_key?('valueUnits')
              intResult[:valueUnits] = hResult['valueUnits']
            end

            if hResult.has_key?('valueRecordType')
              intResult[:valueRecordType] = hResult['valueRecordType']
            end

            return intResult
          end
        end

      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
adiwg-mdtranslator-2.19.0.pre.beta.13 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.19.0.pre.beta.12 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.19.0.pre.beta.11 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.19.0.pre.beta.10 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.19.0.pre.beta.9 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.19.0.pre.beta.8 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.19.0.pre.beta.7 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.4 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.2 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.1 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.0 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.0rc9 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.0rc8 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.0rc7 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.0rc6 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.0rc5 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb
adiwg-mdtranslator-2.18.0rc4 lib/adiwg/mdtranslator/readers/mdJson/modules/module_quantitativeResult.rb