class HQMF::Coded
Represents a HQMF
CD value which has a code and codeSystem
Attributes
code[R]
code_list_id[R]
null_flavor[R]
original_text[R]
system[R]
title[R]
type[R]
Public Class Methods
for_code_list(code_list_id,title=nil)
click to toggle source
# File lib/hqmf-model/types.rb, line 173 def self.for_code_list(code_list_id,title=nil) HQMF::Coded.new('CD',nil,nil,code_list_id,title) end
for_null_flavor(null_flavor,original_text=nil)
click to toggle source
# File lib/hqmf-model/types.rb, line 181 def self.for_null_flavor(null_flavor,original_text=nil) HQMF::Coded.new('CD',nil,nil,nil,nil,null_flavor,original_text) end
for_single_code(system,code,title=nil)
click to toggle source
# File lib/hqmf-model/types.rb, line 177 def self.for_single_code(system,code,title=nil) HQMF::Coded.new('CD',system,code,nil,title) end
from_json(json)
click to toggle source
# File lib/hqmf-model/types.rb, line 185 def self.from_json(json) json = json.with_indifferent_access type = json["type"] if json["type"] system = json["system"] if json["system"] code = json["code"] if json["code"] code_list_id = json["code_list_id"] if json["code_list_id"] title = json["title"] if json["title"] null_flavor = json["null_flavor"] if json["null_flavor"] original_text = json["original_text"] if json["original_text"] HQMF::Coded.new(type,system,code,code_list_id,title, null_flavor, original_text) end
new(type,system,code,code_list_id=nil,title=nil,null_flavor=nil,original_text=nil)
click to toggle source
Create a new HQMF::Coded
@param [String] type @param [String] system @param [String] code @param [String] code_list_id
# File lib/hqmf-model/types.rb, line 163 def initialize(type,system,code,code_list_id=nil,title=nil,null_flavor=nil,original_text=nil) @type = type @system = system @code = code @code_list_id = code_list_id @title = title @null_flavor = null_flavor @original_text = original_text end
Public Instance Methods
==(other)
click to toggle source
# File lib/hqmf-model/types.rb, line 214 def ==(other) check_equality(self,other) end
derived?()
click to toggle source
# File lib/hqmf-model/types.rb, line 206 def derived? false end
to_json()
click to toggle source
# File lib/hqmf-model/types.rb, line 198 def to_json build_hash(self, [:type,:system,:code,:code_list_id,:title,:null_flavor,:original_text]) end
unit()
click to toggle source
# File lib/hqmf-model/types.rb, line 210 def unit nil end
value()
click to toggle source
# File lib/hqmf-model/types.rb, line 202 def value code end