Class: AQI::RecordHeader

Inherits:
Object
  • Object
show all
Defined in:
lib/aqi/record_header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(practice_id) ⇒ RecordHeader

Returns a new instance of RecordHeader.



5
6
7
# File 'lib/aqi/record_header.rb', line 5

def initialize(practice_id)
  self.practice_id = practice_id
end

Instance Attribute Details

#practice_idObject

Returns the value of attribute practice_id.



3
4
5
# File 'lib/aqi/record_header.rb', line 3

def practice_id
  @practice_id
end

Instance Method Details

#to_xmlObject



9
10
11
12
13
14
15
16
# File 'lib/aqi/record_header.rb', line 9

def to_xml
  builder = Builder::XmlMarkup.new
  builder.RecordHeader do |rh|
    rh.PracticeID(practice_id)
    rh.CreatedBy('ProMedical')
    rh.CreateDate(Time.now.strftime('%FT%T'))
  end
end