class CdiscChangesReport C_CLASS_NAME = "CdiscChangesReport" C_FIRST_PAGE = 5 C_PER_PAGE = 9 # Create the CDISC changes report # # @param results [Hash] the results hash # @param cls [Hash] the code lists # @param user [User] the user # @return [String] the HTML def create(results, cls, user, custom_body=nil) @report = WickedCore.new @report.open(results, cls, "CDISC Terminology Change Report", "", [], user, custom_body) @report.close return @report.html end if Rails.env == "test" # Return the current HTML. Only available for testing. # # @return [String] The HTML def html return @report.html end end # private def body(results, cls) @report = WickedCore.new html = "" html += '
' html += "

Conventions

" html += "

In the following table for a code list entry:

" index = 0 page_count = C_FIRST_PAGE cls.each do |cl, key| if index % page_count == 0 if index == 0 html += "

Changes

" else html += "" @report.add_to_body(html) @report.add_page_break page_count = C_PER_PAGE html = "" index = 1 end html += "" html += "" html += "" html += "" results.each do |result| # r = result[:results] html += "" end html += "" end s = cl[:status] html += "" html += "" html += "" html += "" s.each do |status| if status == :created html += "" elsif status == :no_change html += "" elsif status == :updated html += "" elsif status == :deleted html += "" elsif status == :not_present html += "" else html += "" end end html += "" index += 1 end @report.add_to_body(html) end end
IdentifierLabelSubmission Value" + result[:date] + "
#{key}#{cl[:preferred_term]}#{cl[:notation]}C-UX [#{status}]>