Skip to content

Commit

Permalink
Merge pull request #27 from MeasureAuthoringTool/feature/MAT-8008-log…
Browse files Browse the repository at this point in the history
…ging

MAT-8008: enhance logging for qrda-export-service
  • Loading branch information
nmorasb authored Dec 9, 2024
2 parents d7fd1bd + 96dcf9b commit f456a91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions service/web_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
require 'rack'
require 'rack/contrib' # Includes the JSONBodyParser middleware
require 'jwt'
require 'logger'

puts "Loading QRDA Export Service"

logger = Logger.new(STDOUT)

# Override the as_json method to ensure the _id is displayed as
# just the _id value as a string in the QRDA XML, "<_id>".
# Without this override it will be serialized as extended
Expand Down Expand Up @@ -101,6 +104,8 @@ def as_json(*args)
begin
qrda = Qrda1R5.new(patient, measure, measure_dto["options"].symbolize_keys).render
rescue Exception => e
logger.error("An error occurred generating QRDA for measure [#{madie_measure["id"]}] test case ID [#{test_case["id"]}]: #{e.message}")
logger.error(e.backtrace.join("\n"))
qrda_errors[patient.id] = e
end

Expand Down

0 comments on commit f456a91

Please sign in to comment.