onc-healthit / inferno-program

Archived source code for the Inferno Testing Tool and the Program Edition set of tests. No longer maintained.
https://inferno.healthit.gov/
Apache License 2.0
38 stars 12 forks source link

"USCID-08: All must support elements are provided in the Device resources returned" Test is Skipped since Device.distinctIdentifier element has no data #410

Closed harishrr41 closed 2 years ago

harishrr41 commented 2 years ago

Thank you for reporting a possible bug in Inferno! Please fill in as much of the template below as you can.

Subject of the issue To Inferno team, As per US Core US Core Implementation Guide STU 3 specifications, Device.distinctIdentifier Element is an Optional Element – Reference URL http://www.hl7.org/fhir/us/core/STU3/StructureDefinition-us-core-device-definitions.html#Device

US Core Implementation Guide STU 3

Currently our EHR system has no support for this data element. For the Single Patient API validation of Device Resource, USCID-08 Test has been Skipped while looking to validate the Device.distinctIdentifier element. It seems Inferno Application is currently treating the Device.distinctIdentifier element as Mandatory?

Your environment

Steps to reproduce After retrieving the Token, select Single Patient API and enter the Patient ID of 2046700200 and run all tests. When tests are completed open results of USCID-08.

Include: The selected test suite: Single patient API run by Patient ID/ Device Resource The URL of the FHIR server being tested: https://fhiri221es.rd.allscripts.com/ The Test ID, if it's a problem with a specific test: USCID-08 Any required configuration options (client ID, client secret, etc.); only patient ID as shown above 2046700200 Anything else needed to make the issue occur.

Expected behavior Tell us what should happen. "USCID-08: All must support elements are provided in the Device resources returned" Test SHOULD NOT be Skipped. "USCID-08: All must support elements are provided in the Device resources returned" Test SHOULD CONSIDER Device.distinctIdentifier element as OPTIONAL.

Actual behavior Tell us what happens instead. Include screenshots if possible. "USCID-08: All must support elements are provided in the Device resources returned" Test is Skipped because there is no data present in the EHR System for the Device.distinctIdentifier element.


USCID-08 ACTUAL RESULT Test is Skipped

Thanks

yunwwang commented 2 years ago

Hello @harishrr41

Are you using Inferno Program edition or Community edition since you mentioned Community edition while the release version is from Program edition.

Either way, both editions support US Core v3.1.1 only.

You can find ImplantableDevice profile for v3.1.1 here

harishrr41 commented 2 years ago

Hi @yunwwang,

For the USCID-08 Test to be PASS, can you please confirm if Inferno is expecting a data absent reason when the data element (Device.distinctIdentifier) is missing?

Let's say: The element (Device.distinctIdentifier) is not supported & the 'data absent reason' for this missing element is also not supported. In this situation, the data element or the data absent reason will not be returned.

Reference from one of the US Core definitions of MUST SUPPORT below: "In situations where information on a particular data element is not present and the reason for absence is unknown, US Core Responders SHALL NOT include the data elements in the resource instance returned as part of the query results."

Thanks

yunwwang commented 2 years ago

Here is an FAQ about how Inferno test MustSupport.

Please let me know if that FAQ answers your question.

harishrr41 commented 2 years ago

Hi @yunwwang From the below FAQ: Can you please elaborate on It is not necessary that one resource contain all MustSupport elements.

Q: How does Inferno test MustSupport flag on an element? A: Inferno follows guidance provided by HL7 FHIR Conformance Rules and US Core IG General Guidance. Inferno checks that a server implementation SHALL demonstrate that it supports the "MustSupport" element in a meaningful way. In general, Inferno "MustSupport" tests check that each "MustSupport" element is present in at least one resource from all resources returned from the server. It is not necessary that one resource contain all MustSupport elements. Inferno does not consider using a "Data Absent Reason" (DAR) extension on a "MustSupport" element as supporting the element "in a meaningful way," so Inferno ignores elements with DAR extensions when looking for "MustSupport" elements.

In our JSON response, Device.distinctIdentifier element is not returned. Can you please confirm if our current behavior falls within one of the definitions of MUST SUPPORT highlighted in BOLD ITALICS below:

Must support = true

  1. Usually this means that the Responders should include the data in the query result if the data is present for the given resource instance.
  2. Responders SHALL be capable of including the data element as part of the query results as specified by the Server Capability Statement. In situations where information on a particular data element is not present and the reason for absence is unknown, Responders SHALL leave the data elements empty in the resource instance returned as part of the query results.
yunwwang commented 2 years ago

There are two layers of validation. One is testing the resource validation level. If a server doesn't have Device.distinctIdentifier for a particular Device resource, then the server leaves it empty. That is correct. The second one is testing the server capability level. If a server don't return Device.distinctIdentifier at all, that means the server does NOT support (or at least the server has not demonstrated that it supports) Device.distinctIdentifier element.

Because Device.distinctIdentifier has cardinality [0..1], so a server does not have to return all Device resources with Device.distinctIdentifier, as mentioned in the quoted text. But it need at least one Device resource having Device.distinctIdentifier to show that it can populate (support) the element.

Inferno Program is a testing client for ONC (g)(10) testing procedure. If you need a testing client for just US Core v3.1.1, you could try Inferno Community edition which provides more flexibility than Inferno Program.