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 += '
In the following table for a code list entry:
C = Code List was created in the CDISC Terminology
U = Code List was updated in some way
'-' = There was no change to the Code List
X = The Code List was deleted from teh CDISC Terminology
Identifier | " html += "Label | " html += "Submission Value | " results.each do |result| # r = result[:results] html += "" + result[:date] + " | " end html += "" end s = cl[:status] html += "|||||
---|---|---|---|---|---|---|---|---|
#{key} | " html += "#{cl[:preferred_term]} | " html += "#{cl[:notation]} | " s.each do |status| if status == :created html += "C | " elsif status == :no_change html += "- | " elsif status == :updated html += "U | " elsif status == :deleted html += "X | " elsif status == :not_present html += "" else html += " | [#{status}]> | " end end html += "