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 error when testing "8.3.10 Device resources returned conform to the US Core Implantable Device Profile" (FI-2523) #494

Closed bholyshevskyi closed 1 month ago

bholyshevskyi commented 4 months ago

When tested "ONC Certification (g)(10) Standardized API V.5.1.0" with "US Core 6.1.0 / USCDI v3, SMART App Launch 2.0.0, Bulk Data 2.0.0" a test "8.3.10 Device resources returned conform to the US Core Implantable Device Profile" returs an error from Inferno test tool.

Error: undefined method `each' for nil:NilClass

    profile_urls.each do |profile_url|
                ^^^^^
/usr/local/bundle/gems/onc_certification_g10_test_kit-5.1.0/lib/onc_certification_g10_test_kit/bulk_export_validation_tester.rb:150:in `block in check_file_request'

image

Device FHIR resource json:

{"resourceType":"Device","meta":{"versionId":"076986bc-977c-4e92-9e83-623aad5772bf","lastUpdated":"2024-02-21T13:35:44.226Z","profile":["http://hl7.org/fhir/us/core/StructureDefinition/us-core-implantable-device"]},"udiCarrier":[{"deviceIdentifier":"987979879879","carrierHRF":"(01)987979879879(11)191015(17)220101(10)M320(21)AC221","entryType":"rfid"}],"status":"active","manufacturer":"ACME Biomedical","manufactureDate":"2015-10-15","expirationDate":"2022-01-01","lotNumber":"M320","serialNumber":"AC221","deviceName":[{"name":"ACME Knee Replacement Device","type":"udi-label-name"}],"modelNumber":"1.0","type":{"coding":[{"system":"http://snomed.info/sct","code":"109228008","display":"Knee joint prosthesis","version":"http://snomed.info/sct/731000124108"}],"text":"Knee joint prosthesis"},"patient":{"reference":"Patient/abea773d-12d2-41ee-a72d-3ca84808e82f","display":"Amy V. Shaw"},"distinctIdentifier":"002ab0ed-1741-4e13-a60c-bd343f202307","id":"feea2ce3-b17d-4ff6-839d-fb908e6f612b"}
yunwwang commented 4 months ago

@bholyshevskyi Have you specified the "Implantable Device Type Code" for you testing? If so, what are the codes you put in?

image

bholyshevskyi commented 4 months ago

@yunwwang thank you for pointing it out. I've entered Device's id in this filed instead of a code.

bholyshevskyi commented 4 months ago

Closing the issue as it's not reproducible when value of Device.type.coding[0].code is entered to the "Implantable Device Type Code" field.

yunwwang commented 4 months ago

@bholyshevskyi I also find a logic bug in our own code. I will re-open this ticket to fix that.

yunwwang commented 4 months ago

If "Device Type Code" is provided, Bulk data validation SHALL validate only resources filtered by "Device Type Code".