Skip to content

Commit

Permalink
MAT-8008: add logging to print measure and test case ID when test cas…
Browse files Browse the repository at this point in the history
…e QRDA fails to generate
  • Loading branch information
nmorasb committed Dec 9, 2024
1 parent d7fd1bd commit 96dcf9b
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 96dcf9b

Please sign in to comment.