Class: HL7::Message::Segment::ZDRF

Inherits:
HL7::Message::Segment
  • Object
show all
Defined in:
lib/segments/zdrf.rb

Instance Method Summary collapse

Instance Method Details

#provider_hash(key, code) ⇒ Object



38
39
40
# File 'lib/segments/zdrf.rb', line 38

def provider_hash(key,code)
  to_hash.merge({"providerType"=>code})
end

#to_hashObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/segments/zdrf.rb', line 25

def to_hash
  return @hash if @hash
  
  hash = super.to_hash
  hash["id"] = hash["customField1"]
  hash["npi"] = find_value(hash["customField2"])
  hash["phone"] = find_value(hash["customField3"])
  hash["email"] = find_value(hash["customField4"])
  hash["fname"] = find_value(hash["customField5"])
  hash["lname"] = find_value(hash["customField6"])
  hash
end