onc-healthit / onc-certification-g10-test-kit

ONC Certification (g)(10) Standardized API Tests
Apache License 2.0
32 stars 10 forks source link

Inferno Provenance validation test failed when resource does not have agent.who.reference (FI-2790) #514

Open yunwwang opened 1 month ago

yunwwang commented 1 month ago

US Core Provenance Profile mandate server populate agent.who.reference. When server does not do that, instead of raising an error, Inferno Provenance validation test throws purple error:

undefined method `reference' for nil:NilClass

      ['Practitioner', 'Device'].any? { |resource_type| agent.who.reference&.include?(resource_type) } &&

This is caused by the resource provided does not have agent.who.reference.

Though the bug does not affect testing result, ie agent.who.reference is missing, we still should fix the purple error with a correct error message.