Sha256: 083b6914347238e8c4c15281f5d3a752c1ddda4c4b3aa2ef85c8b93a69150155

Contents?: true

Size: 813 Bytes

Versions: 34

Compression:

Stored size: 813 Bytes

Contents

module HQMF
  
  class Attribute
    include HQMF::Conversion::Utilities
    attr_reader :id,:code,:value,:unit,:name
    # @param [String] id
    # @param [String] code
    # @param [String] value
    # @param [String] unit
    # @param [String] name
    def initialize(id,code,value,unit,name)
      @id = id
      @code = code
      @value = value
      @unit = unit
      @name = name
    end
  
    def self.from_json(json)
      id = json["id"] if json["id"]
      code = json["code"] if json["code"]
      value = json["value"] if json["value"]
      unit = json["unit"] if json["unit"]
      name = json["name"] if json["name"]
    
      HQMF::Attribute.new(id,code,value,unit,name)
    end
  
    def to_json
      json = build_hash(self, [:id,:code,:value,:unit,:name])
      json
    end
  
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
health-data-standards-3.1.1 lib/hqmf-model/attribute.rb
health-data-standards-3.1.0 lib/hqmf-model/attribute.rb
health-data-standards-3.0.6 lib/hqmf-model/attribute.rb
health-data-standards-3.0.5 lib/hqmf-model/attribute.rb
health-data-standards-3.0.4 lib/hqmf-model/attribute.rb
health-data-standards-3.0.3 lib/hqmf-model/attribute.rb
hqmf-parser-1.1.0 lib/hqmf-model/attribute.rb
hqmf-parser-1.0.6 lib/hqmf-model/attribute.rb
hqmf-parser-1.0.5 lib/hqmf-model/attribute.rb
hqmf-parser-1.0.4 lib/hqmf-model/attribute.rb
hqmf-parser-1.0.3 lib/hqmf-model/attribute.rb
hqmf-parser-1.0.2 lib/hqmf-model/attribute.rb
hqmf-parser-1.0.1 lib/hqmf-model/attribute.rb
hqmf-parser-1.0.0 lib/hqmf-model/attribute.rb